On today's systems fork() will hardly fail, thus removed the fork retry loops.
[mmh] / sbr / push.c
index 17c62ee..eb6011a 100644 (file)
@@ -15,12 +15,8 @@ void
 push(void)
 {
        pid_t pid;
 push(void)
 {
        pid_t pid;
-       int i;
 
 
-       for (i = 0; (pid = fork()) == -1 && i < 5; i++)
-               sleep(5);
-
-       switch (pid) {
+       switch (pid = fork()) {
        case -1:
                /* fork error */
                advise(NULL, "unable to fork, so can't push...");
        case -1:
                /* fork error */
                advise(NULL, "unable to fork, so can't push...");