in reply to Re^2: fork on windows - viewing pseudo-processes
in thread fork on windows - viewing pseudo-processes
In any event, your dead children are waiting around as zombies for you to acknowledge their death. The zombies are preventing you from forking off more children. If you don't care about acknowledging their death, you can use something like this:sub reaper { my $deadChildPID = wait; print "Reaped child $deadChildPID\n"; } $SIG{'CHLD'} = \&reaper; # ..... some time later ..... if( $pid = fork() ) { # begin FORK section }
before you fork off any processes. This should work in Windows (and UNIX) to automatically reap your children without making a handler function.$SIG{CHLD}='IGNORE';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: fork on windows - viewing pseudo-processes
by BrowserUk (Patriarch) on Aug 28, 2007 at 00:14 UTC |