]> diplodocus.org Git - nmh/blobdiff - uip/whatnowsbr.c
Added support for "-" to indicate stdout to output_message().
[nmh] / uip / whatnowsbr.c
index c9cbf50384096b5e6fe556d18cf893db8f7db2e7..90a2cf2e26cf3b1c3b7f2f22e573cd9d2ce10a35 100644 (file)
@@ -697,7 +697,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
     context_save ();   /* save the context file */
     fflush (stdout);
 
-    switch (pid = vfork()) {
+    switch (pid = fork()) {
        case NOTOK:
            advise ("fork", "unable to");
            status = NOTOK;
@@ -845,7 +845,7 @@ sendfile (char **arg, char *file, int pushsw)
     context_save ();   /* save the context file */
     fflush (stdout);
 
-    for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
+    for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
        sleep (5);
     switch (child_id) {
        case NOTOK:
@@ -940,6 +940,7 @@ check_draft (char *msgnam)
                 */
                if (uprf (name, XXX_FIELD_PRF)) {
                    fclose (fp);
+                   m_getfld_state_destroy (&gstate);
                    return 0;
                }
                while (state == FLDPLUS) {
@@ -955,6 +956,7 @@ check_draft (char *msgnam)
                    for (bp = buf; *bp; bp++)
                        if (*bp != ' ' && *bp != '\t' && *bp != '\n') {
                            fclose (fp);
+                           m_getfld_state_destroy (&gstate);
                            return 1;
                        }
 
@@ -965,10 +967,10 @@ check_draft (char *msgnam)
 
            default:
                fclose (fp);
+               m_getfld_state_destroy (&gstate);
                return 0;
        }
     }
-    m_getfld_state_destroy (&gstate);
 }
 
 
@@ -1331,7 +1333,7 @@ whomfile (char **arg, char *file)
     context_save ();   /* save the context file */
     fflush (stdout);
 
-    switch (pid = vfork()) {
+    switch (pid = fork()) {
        case NOTOK:
            advise ("fork", "unable to");
            return 1;