perlknight has asked for the wisdom of the Perl Monks concerning the following question:
what's does this line do, $CHILDREN{$child}->($child) if ref $CHILDREN{$child} eq 'CODE'? Is it saying $CHILDREN{$child} = $child if ref $CHILDREN{$child} eq 'CODE'? What does the value 'CODE' means?sub reap_child { while ( (my $child = waitpid(-1,WHNOHANG)) > 0) { $CHILDREN{$child}->($child) if ref $CHILDREN{$child} eq 'CODE'; delete $CHILDREN{$child}; } }
what does </code>"kill TERM => keys %CHILDREN;"</code> mean? Send a Kill TERM signal to all children pid? Not use to seing "TERM => (value ... values + n". Thanks.sub kill_children { kill TERM => keys %CHILDREN; sleep while %CHILDREN; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bulletproofing Servers
by jwest (Friar) on Jul 19, 2002 at 19:24 UTC | |
|
Re: Bulletproofing Servers
by talexb (Chancellor) on Jul 19, 2002 at 19:25 UTC |