fcgiclear aborts non fcgi php processes

We've been having trouble with some php daemons we have running with Virtualmin, they seem to all abort top of the hour. I THINK I found the problem fcgiclear.pl looks for php programs that have a parent of 1 (which is orphaned fcgi process of course, but, also, our daemons since a daemon has a parent of 1 also.

Looking at the regular expression, and I am not an expert on those, I believe it matches php (4 or 5 is optional) followed OPTIONALLY by -cgi.

Not sure why you are optionally looking for -cgi, I thought all of them were like php-fcgi?

The ? means 0 or 1, so, daemons such as:

/usr/bin/php /root/OurDaemon.php

Will in fact match. SHouldn't the -fcgi be REQUIRED to match?

If not, can you match on the ful path, i.e. /usr/bin/php-fcgi?

Status: 
Closed (fixed)

Comments

You are right, the check should only match the -cgi processes .. I will fix this in the next Virtualmin release.

If I a not mistaken, changing the ? to a + would fix it. More accurate would likely be a {1}

Automatically closed -- issue fixed for 2 weeks with no activity.