]> diplodocus.org Git - nmh/blobdiff - uip/post.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / post.c
index ec85d93ce207f9fca12b612080cc515d135047f1..69fe6b86c2c62ec1458badda67f56317e5321c28 100644 (file)
@@ -15,8 +15,8 @@
 #include <h/utils.h>
 #include <h/tws.h>
 #include <h/mts.h>
-#include "../sbr/m_mktemp.h"
-#include "../sbr/message_id.h"
+#include "sbr/m_mktemp.h"
+#include "sbr/message_id.h"
 
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
@@ -1512,8 +1512,7 @@ make_bcc_file (int dashstuff)
      * of MIME encapsulation.
      */
     if (filter != NULL) {
-       for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
-           sleep (5);
+       child_id = fork();
        switch (child_id) {
            case NOTOK: 
                adios ("fork", "unable to");
@@ -1669,7 +1668,7 @@ static void
 post (char *file, int bccque, int talk, int eai, char *envelope,
       int oauth_flag, char *auth_svc)
 {
-    int        retval, i;
+    int retval;
     pid_t child_id;
 
     if (verbose) {
@@ -1686,8 +1685,7 @@ post (char *file, int bccque, int talk, int eai, char *envelope,
        char **argp, *program;
        int argc;
 
-       for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
-           sleep (5);
+       child_id = fork();
        switch (child_id) {
            case NOTOK: 
                adios ("fork", "unable to");
@@ -1982,7 +1980,7 @@ static void
 fcc (char *file, char *folder)
 {
     pid_t child_id;
-    int i, status, argp;
+    int status, argp;
     char fold[BUFSIZ];
     char **arglist, *program;
 
@@ -1990,9 +1988,7 @@ fcc (char *file, char *folder)
        printf ("  %sFcc %s: ", msgstate == RESENT ? "Resent-" : "", folder);
     fflush (stdout);
 
-    for (i = 0; (child_id = fork ()) == NOTOK && i < 5; i++)
-       sleep (5);
-
+    child_id = fork();
     switch (child_id) {
        case NOTOK: 
            if (!verbose)