resty: removed the redundant child process reaping code, which also fixes a warning reported by Anton Heryanto.
This commit is contained in:
parent
1140a2fa67
commit
fd1f99ff52
18
util/resty
18
util/resty
|
@ -155,24 +155,6 @@ my $cmd = "$nginx_path -p $prefix_dir/";
|
||||||
|
|
||||||
my $child_pid;
|
my $child_pid;
|
||||||
|
|
||||||
sub reaper {
|
|
||||||
$SIG{CHLD} = \&reaper;
|
|
||||||
if ($child_pid) {
|
|
||||||
my ($pid, $status);
|
|
||||||
do {
|
|
||||||
$pid = waitpid(-1, WNOHANG);
|
|
||||||
if ($child_pid == $pid) {
|
|
||||||
$status = $?;
|
|
||||||
undef $child_pid;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
} while $pid > 0;
|
|
||||||
exit($status || 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$SIG{CHLD}=\&reaper;
|
|
||||||
|
|
||||||
sub sigint {
|
sub sigint {
|
||||||
$SIG{INT} = \&sigint;
|
$SIG{INT} = \&sigint;
|
||||||
if ($child_pid) {
|
if ($child_pid) {
|
||||||
|
|
Loading…
Reference in New Issue