On today's systems fork() will hardly fail, thus removed the fork retry loops.
[mmh] / uip / send.c
index a90c6b2..2ef1fe7 100644 (file)
@@ -517,7 +517,6 @@ attach(char *draft_file_name)
        ** Note that mhbuild is in the context as buildmimeproc.
        */
        sprintf(buf, "%s %s", buildmimeproc, composition_file_name);
-
        if (system(buf) != 0) {
                /* some problem */
                clean_up_temporary_files();
@@ -621,7 +620,7 @@ static int
 sendaux(char **vec, int vecp, char *drft, struct stat *st)
 {
        pid_t child_id;
-       int i, status, fd;
+       int status, fd;
        char backup[BUFSIZ];
 
        /*
@@ -636,10 +635,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st)
        }
        vec[vecp] = NULL;
 
-       for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) {
-               sleep(5);
-       }
-       switch (child_id) {
+       switch (child_id = fork()) {
        case -1:
                /* oops -- fork error */
                adios("fork", "unable to");
@@ -704,14 +700,10 @@ static void
 alert(char *file, int out)
 {
        pid_t child_id;
-       int i, in;
+       int in;
        char buf[BUFSIZ];
 
-       for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) {
-               sleep(5);
-       }
-
-       switch (child_id) {
+       switch (child_id = fork()) {
        case NOTOK:
                /* oops -- fork error */
                advise("fork", "unable to");
@@ -746,7 +738,6 @@ alert(char *file, int out)
                /* create subject for error notification */
                snprintf(buf, sizeof(buf), "send failed on %s",
                                forwsw ? "enclosed draft" : file);
-
                execlp(mailproc, mhbasename(mailproc), getusername(),
                                "-subject", buf, NULL);
                fprintf(stderr, "unable to exec ");