bugfix: resty: we should check the case when exec() fails. thanks Michal Cichra for the original patch in #65.

pull/67/head
Yichun Zhang (agentzh) 10 years ago
parent c7eea80684
commit 07913609c6

@ -29,7 +29,8 @@ if (!-f $nginx_path) {
} }
if ($opts{V}) { if ($opts{V}) {
exec "$nginx_path -V"; my $cmd = "$nginx_path -V";
exec $cmd or die "Failed to run command \"$cmd\": $!\n";
} }
my $lua_package_path_config = ''; my $lua_package_path_config = '';
@ -259,7 +260,7 @@ if (!defined $pid) {
if ($pid == 0) { # child process if ($pid == 0) { # child process
#warn "exec $cmd..."; #warn "exec $cmd...";
exec $cmd; exec $cmd or die "Failed to run command \"$cmd\": $!\n";
} else { } else {
$child_pid = $pid; $child_pid = $pid;

Loading…
Cancel
Save