X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1dd139e04f59bbfa3a310c2776c4bb2e2fdf1fdd..7a5b7cbf34581a0294713ef5bb92ec5566b6be9f:/uip/forw.c diff --git a/uip/forw.c b/uip/forw.c index cb025541..6ec53be3 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -8,8 +8,9 @@ #include #include #include +#include "h/done.h" #include -#include "../sbr/m_maildir.h" +#include "sbr/m_maildir.h" #define IFORMAT "digest-issue-%s" @@ -178,7 +179,7 @@ main (int argc, char **argv) case FILTSW: if (!(cp = *argp++) || *cp == '-') adios (NULL, "missing argument to %s", argp[-2]); - filter = getcpy (etcpath (cp)); + filter = mh_xstrdup(etcpath(cp)); mime = 0; continue; case FORMSW: @@ -187,7 +188,7 @@ main (int argc, char **argv) continue; case FRMTSW: - filter = getcpy (etcpath (mhlforward)); + filter = mh_xstrdup(etcpath(mhlforward)); continue; case NFRMTSW: filter = NULL; @@ -290,8 +291,7 @@ main (int argc, char **argv) if (*cp == '+' || *cp == '@') { if (folder) adios (NULL, "only one folder at a time!"); - else - folder = pluspath (cp); + folder = pluspath (cp); } else { app_msgarg(&msgs, cp); } @@ -485,7 +485,7 @@ mhl_draft (int out, char *digest, int volume, int issue, char *file, char *filter, int dashstuff) { pid_t child_id; - int i, msgnum, pd[2]; + int msgnum, pd[2]; char buf1[BUFSIZ]; char buf2[BUFSIZ]; char *program; @@ -496,9 +496,7 @@ mhl_draft (int out, char *digest, int volume, int issue, argsplit_msgarg(&vec, mhlproc, &program); - for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) - sleep (5); - + child_id = fork(); switch (child_id) { case NOTOK: adios ("fork", "unable to"); @@ -543,7 +541,7 @@ mhl_draft (int out, char *digest, int volume, int issue, execvp (program, vec.msgs); fprintf (stderr, "unable to exec "); perror (mhlproc); - _exit (-1); + _exit(1); default: close (pd[1]);