On today's systems fork() will hardly fail, thus removed the fork retry loops.
[mmh] / uip / mhbuildsbr.c
index 069ea85..efbb8ac 100644 (file)
@@ -1017,7 +1017,7 @@ compose_content(CT ct)
        default:
                if (!ce->ce_file) {
                        pid_t child_id;
-                       int i, xstdout, len, buflen;
+                       int xstdout, len, buflen;
                        char *bp, **ap, *cp;
                        char *vec[4], buffer[BUFSIZ];
                        FILE *out;
@@ -1119,9 +1119,7 @@ raw:
                        if ((out = fopen(ce->ce_file, "w")) == NULL)
                                adios(ce->ce_file, "unable to open for writing");
 
-                       for (i = 0; (child_id = fork()) == NOTOK && i > 5; i++)
-                               sleep(5);
-                       switch (child_id) {
+                       switch (child_id = fork()) {
                        case NOTOK:
                                adios("fork", "unable to fork");
                                /* NOTREACHED */