mhmail: Don't invoke inc when called without arguments.
[mmh] / uip / mhmail.c
index 2b8589f..72771a7 100644 (file)
@@ -60,10 +60,9 @@ main(int argc, char **argv)
        if (context_foil(NULL) == -1)
                done(1);
 
        if (context_foil(NULL) == -1)
                done(1);
 
-       /* If no arguments, just incorporate new mail */
+       /* Without arguments, exit. */
        if (argc == 1) {
        if (argc == 1) {
-               execlp(incproc, mhbasename(incproc), NULL);
-               adios(incproc, "unable to exec");
+               adios(NULL, "no interactive mail shell. Use inc/scan/show instead.");
        }
 
        arguments = getarguments(invo_name, argc, argv, 0);
        }
 
        arguments = getarguments(invo_name, argc, argv, 0);
@@ -80,7 +79,7 @@ main(int argc, char **argv)
 
                        case HELPSW:
                                snprintf(buf, sizeof(buf),
 
                        case HELPSW:
                                snprintf(buf, sizeof(buf),
-                                               "%s [addrs ... [switches]]",
+                                               "%s addrs... [switches]",
                                                invo_name);
                                print_help(buf, switches, 0);
                                done(1);
                                                invo_name);
                                print_help(buf, switches, 0);
                                done(1);