Skip to content

Commit

Permalink
Merge branch 'master' of github.com:virtualmin/virtualmin-nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Jul 8, 2016
2 parents 6b09797 + bcf24e9 commit 05b4062
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions php-loop.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
use warnings;
use POSIX;

my $dead = 0;
my $childpid;
our $dead = 0;
our $childpid = 0;

$SIG{'TERM'} = sub { $dead = 1;
if ($childpid) {
kill('TERM', $childpid);
sleep(1); # Give it time to clean up
kill('KILL', $childpid);
}
exit(1);
};
$SIG{'TERM'} = sub {
$dead = 1;
if ($childpid) {
kill('TERM', $childpid);
sleep(1); # Give it time to clean up
kill('KILL', $childpid);
}
exit(1);
};

while(!$dead) {
my $start = time();
Expand Down

0 comments on commit 05b4062

Please sign in to comment.