diff --git a/php-loop.pl b/php-loop.pl index c3f4d9e..cc0c110 100755 --- a/php-loop.pl +++ b/php-loop.pl @@ -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) {