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);
case HELPSW:
snprintf(buf, sizeof(buf),
- "%s [addrs ... [switches]]",
+ "%s addrs... [switches]",
invo_name);
print_help(buf, switches, 0);
done(1);
if (tolist == NULL)
adios(NULL, "usage: %s addrs ... [switches]", invo_name);
- tfile = m_mktemp2(NULL, invo_name, NULL, &out);
+ tfile = m_mktemp2("/tmp/", invo_name, NULL, &out);
if (tfile == NULL)
adios("mhmail", "unable to create temporary file");
chmod(tfile, 0600);
vec[nvec++] = "-queued";
vec[nvec] = NULL;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep(5);
-
- if (child_id == NOTOK) {
+ if ((child_id = fork()) == NOTOK) {
/* report failure and then send it */
adios(NULL, "unable to fork");
} else if (child_id) {