--- jobs.c~ Mon Nov 5 14:56:17 2001 +++ jobs.c Mon Mar 25 10:04:39 2002 @@ -1178,18 +1178,11 @@ #endif /* BUFFERED_INPUT */ /* Create the child, handle severe errors. */ - if ((pid = fork ()) < 0) + while ((pid = fork ()) < 0) { - sys_error ("fork"); - - /* Kill all of the processes in the current pipeline. */ - terminate_current_pipeline (); - - /* Discard the current pipeline, if any. */ - if (the_pipeline) - kill_current_pipeline (); - - throw_to_top_level (); /* Reset signals, etc. */ + sleep(1); /* This time shouldn't be hardcoded */ + /* It would be better to have a primitive in the kernel */ + /* that sleeps until fork() is available */ } if (pid == 0) --- nojobs.c~ Mon Oct 22 18:12:45 2001 +++ nojobs.c Mon Mar 25 10:12:17 2002 @@ -478,11 +478,7 @@ #endif /* BUFFERED_INPUT */ /* Create the child, handle severe errors. */ -#if defined (HAVE_WAITPID) - retry_fork: -#endif /* HAVE_WAITPID */ - - if ((pid = fork ()) < 0) + while ((pid = fork ()) < 0) { #if defined (HAVE_WAITPID) /* Posix systems with a non-blocking waitpid () system call available @@ -491,13 +487,12 @@ { reap_zombie_children (); retry = 0; - goto retry_fork; - } + } else #endif /* HAVE_WAITPID */ - sys_error ("fork"); - - throw_to_top_level (); + sleep(1); /* This time shouldn't be hardcoded */ + /* It would be better to have a primitive in the kernel */ + /* that sleeps until fork() is available */ } if (pid == 0)