diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 7964c3fb4..a3452bddc 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -43,7 +43,7 @@ function killbypid($pidfile, $sig = 'TERM', $waitforit = false) { if (isvalidpid($pidfile)) { mwexecf('/bin/pkill -%s -F %s', array($sig, $pidfile)); - } elseif (is_numeric($pidfile) && $pidfile > 0) { + } elseif (is_numeric($pidfile) && $pidfile > 1) { mwexecf('/bin/kill -%s %s', array($sig, $pidfile)); } else { return; @@ -62,7 +62,7 @@ function isvalidpid($pidfile) { if (file_exists($pidfile)) { return mwexecf('/bin/pgrep -nF %s', $pidfile, true) == 0; - } elseif (is_numeric($pidfile) && $pidfile > 0) { + } elseif (is_numeric($pidfile) && $pidfile > 1) { return mwexecf('/bin/kill -0 %s', $pidfile, true) == 0; }