From aa854c0756b9bf9fd26f4e8463603089a1fdfe0b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 12 Mar 2023 10:35:12 -0700 Subject: [PATCH] Don't keep re-trying if PHP doesn't exist https://github.com/virtualmin/virtualmin-nginx/issues/54 --- php-loop.pl | 5 +++++ 1 file changed, 5 insertions(+) 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) {