projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3dc17ed
)
try wait on proc
author
Alan
<alan@roojs.com>
Thu, 12 Oct 2023 07:53:51 +0000
(15:53 +0800)
committer
Alan
<alan@roojs.com>
Thu, 12 Oct 2023 07:53:51 +0000
(15:53 +0800)
Notify.php
patch
|
blob
|
history
diff --git
a/Notify.php
b/Notify.php
index
95b446a
..
5ca067b
100644
(file)
--- a/
Notify.php
+++ b/
Notify.php
@@
-475,6
+475,9
@@
class Pman_Core_Notify extends Pman
foreach($this->pool as $p) {
//echo "CHECK PID: " . $p['pid'] . "\n";
foreach($this->pool as $p) {
//echo "CHECK PID: " . $p['pid'] . "\n";
+
+ pcntl_waitpid($p['proc'], $status, WNOHANG);
+
$info = proc_get_status($p['proc']);
//var_dump($info);
$info = proc_get_status($p['proc']);
//var_dump($info);
@@
-522,7
+525,8
@@
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);
+
//clearstatcache();
//if (file_exists('/proc/'.$p['pid'])) {
//clearstatcache();
//if (file_exists('/proc/'.$p['pid'])) {