From 8c506cad6478ba2e7b415a6a172879ae2863a85e Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 12 Oct 2023 15:59:55 +0800 Subject: [PATCH] proce pid --- Notify.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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'])) { -- 2.39.2