X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhmail.c;h=033c63498772b496f9245f07091a9761efefbb8a;hp=2b8589f5330c90c6bff6367d94138d60d4a5b7cc;hb=3b91e463fc7a4db9e7b69e2e0f4f7909339beea5;hpb=5fbf37ee68e018998ada61eeab73e035b26834b6 diff --git a/uip/mhmail.c b/uip/mhmail.c index 2b8589f..033c634 100644 --- a/uip/mhmail.c +++ b/uip/mhmail.c @@ -60,10 +60,9 @@ main(int argc, char **argv) if (context_foil(NULL) == -1) done(1); - /* If no arguments, just incorporate new mail */ + /* Without arguments, exit. */ 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); @@ -80,7 +79,7 @@ main(int argc, char **argv) case HELPSW: snprintf(buf, sizeof(buf), - "%s [addrs ... [switches]]", + "%s addrs... [switches]", invo_name); print_help(buf, switches, 0); done(1); @@ -165,7 +164,7 @@ main(int argc, char **argv) fclose(out); nvec = 0; - vec[nvec++] = mhbasename(postproc); + vec[nvec++] = "spost"; vec[nvec++] = tmpfil; if (resent) vec[nvec++] = "-dist"; @@ -178,7 +177,7 @@ main(int argc, char **argv) adios(NULL, "unable to fork"); } else if (child_id) { /* parent process */ - if ((status = pidXwait(child_id, postproc))) { + if ((status = pidXwait(child_id, *vec))) { fprintf(stderr, "Letter saved in dead.letter\n"); execl("/bin/mv", "mv", tmpfil, "dead.letter", NULL); execl("/usr/bin/mv", "mv", tmpfil, "dead.letter", @@ -190,9 +189,9 @@ main(int argc, char **argv) done(status ? 1 : 0); } else { /* child process */ - execvp(postproc, vec); + execvp(*vec, vec); fprintf(stderr, "unable to exec "); - perror(postproc); + perror(*vec); _exit(-1); }