From: Alan Date: Thu, 12 Oct 2023 07:59:55 +0000 (+0800) Subject: proce pid X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=8c506cad6478ba2e7b415a6a172879ae2863a85e proce pid --- diff --git a/Notify.php b/Notify.php index 7837e5b8..dffbe77a 100644 --- a/Notify.php +++ b/Notify.php @@ -524,9 +524,13 @@ class Pman_Core_Notify extends Pman //fclose($p['pipes'][1]); proc_close($p['proc']); - proc_terminate($p['proc'], 9); - - pcntl_waitpid($p['proc'], $status, WNOHANG); + proc_terminate($p['pid'], 9); + sleep(1); + clearstatcache(); + if (file_exists('/proc/'. $p['pid'])) { + $this->logecho("proc PID={$p['pid']} still here - trying to wait"); + pcntl_waitpid($p['pid'], $status, WNOHANG); + } //clearstatcache(); //if (file_exists('/proc/'.$p['pid'])) {