]> diplodocus.org Git - nmh/blobdiff - uip/forw.c
Added tests of MMDF mailbox format to test-eom-align.
[nmh] / uip / forw.c
index cb0255418a2a7841182d8313ab55f4bd9f64d50a..288e85a0a47e0f7d8b5f356f3efa43ef1a81680a 100644 (file)
@@ -8,8 +8,9 @@
 #include <h/mh.h>
 #include <fcntl.h>
 #include <h/tws.h>
+#include "h/done.h"
 #include <h/utils.h>
-#include "../sbr/m_maildir.h"
+#include "sbr/m_maildir.h"
 
 
 #define        IFORMAT "digest-issue-%s"
@@ -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]);