mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
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;
|
||||
|
||||
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 {
|
||||
$SIG{INT} = \&sigint;
|
||||
if ($child_pid) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user