If fork() fails, then report a fatal error. Don't spin the cpu
retrying fork() until it succeeds. It can fail when we reach a limit
on the number of processes. Spinning on the cpu would slow down other
processes when we want them to exit. This would get bad if we had a
parallel build with multiple ack processes spinning.
fflush(stdout) ;
fflush(stderr) ;
- while ( (child=fork())== -1 ) ;
+ child= fork() ;
+ if ( child== - 1) {
+ fatal("Cannot fork %s", prog) ;
+ }
if ( child ) {
/* The parent */
do {