/* display the msg being replied to or distributed */
if (msgnam) {
snprintf(buf, sizeof buf, "%s '%s'",
- lproc, msgnam);
+ listproc, msgnam);
system(buf);
} else {
advise(NULL, "no alternate message to display");
case LISTSW:
/* display the draft file */
- snprintf(buf, sizeof buf, "%s '%s'", lproc, drft);
+ snprintf(buf, sizeof buf, "%s '%s'", listproc, drft);
system(buf);
break;
if ((cp = context_find(cp)) != NULL)
*ed = cp;
}
- } else {
+ } else if (!*ed) {
/* set initial editor */
- if (*ed == NULL && (*ed = context_find("editor")) == NULL)
- *ed = defaulteditor;
+ *ed = defaulteditor;
}
if (altmsg) {
sendfile(char **arg, char *file, int pushsw)
{
pid_t child_id;
- int i, vecp;
+ int vecp;
char *vec[MAXARGS];
context_save(); /* save the context file */
fflush(stdout);
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep(5);
- switch (child_id) {
+ switch (child_id = fork()) {
case NOTOK:
advise(NULL, "unable to fork, so sending directly...");
/* fall */
vec[vecp++] = file;
vec[vecp] = NULL;
- execvp(sendproc, vec);
+ execvp("send", vec);
fprintf(stderr, "unable to exec ");
- perror(sendproc);
+ perror("send");
_exit(-1);
default: