Skip to content

Commit

Permalink
Don't keep re-trying if PHP doesn't exist #54
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Mar 12, 2023
1 parent 2e3d9c2 commit aa854c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions php-loop.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
our $dead = 0;
our $childpid = 0;

if (!-x $ARGV[0]) {
print STDERR "PHP command $ARGV[0] does not exist!\n";
exit(2);
}

$SIG{'TERM'} = sub {
$dead = 1;
if ($childpid) {
Expand Down

0 comments on commit aa854c0

Please sign in to comment.