in reply to Re: Re: Reaping Zombies (dont wanna wait)
in thread Reaping Zombies (dont wanna wait)
You can pair this with the original code I posted, substituting insistent_fork for fork. (Works on OS X.)sub insistent_fork { my $pid = undef; FORK: { if (defined ($pid = fork())) { return $pid; } elsif ($! =~ /No more process/) { sleep 5; redo FORK; } else { die "Can't fork: $!\n"; } } }
|
|---|