projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e8a485e
)
proce pid
author
Alan
<alan@roojs.com>
Thu, 12 Oct 2023 07:59:55 +0000
(15:59 +0800)
committer
Alan
<alan@roojs.com>
Thu, 12 Oct 2023 07:59:55 +0000
(15:59 +0800)
Notify.php
patch
|
blob
|
history
diff --git
a/Notify.php
b/Notify.php
index
7837e5b
..
dffbe77
100644
(file)
--- a/
Notify.php
+++ b/
Notify.php
@@
-524,9
+524,13
@@
class Pman_Core_Notify extends Pman
//fclose($p['pipes'][1]);
proc_close($p['proc']);
//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'])) {
//clearstatcache();
//if (file_exists('/proc/'.$p['pid'])) {