Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $waitedpid = 0; my %dbh_pool = (); sub REAPER { $waitedpid = waitpid(-1,WNOHANG); $SIG{CHLD} = \&REAPER; if (defined $waitedpid && $dbh_pool{$waitedpid}{"Active"}) { $dbh_pool{$waitedpid}->disconnect; delete $dbh_pool{$waitedpid}; } } $SIG{CHLD} = \&REAPER;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reaping defunct children
by autark (Friar) on Feb 16, 2001 at 15:10 UTC | |
|
Re (tilly) 1: reaping defunct children
by tilly (Archbishop) on Feb 16, 2001 at 17:22 UTC | |
|
Re: reaping defunct children
by mikfire (Deacon) on Feb 16, 2001 at 20:59 UTC |