>This would be a bad idea since the process never exits.
En? I just want to show the childs exiting status.
Surely,you could modify it simply to get main process exit normally.
for example:
# you could get the childs numbers by counting the @files array
$CHILD_COUNT=N;
# defined the sig handler
$SIG{CHLD}=sub {while((my $child=waitpid(-1,WNOHANG))>0){$CHILD_COUNT--}};
# other codes for 'fork' and 'exec'
# when all childs have exited,the sleep should not get continue
sleep while($CHILD_COUNT);
Hope this helps.
--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>