Open GoogleCodeExporter opened 9 years ago
Actually, that piece of code has always been problematic. In some systems, it
is working perfectly (as it is in my
Debian Lenny server); however, some other Debian servers too are having
problems (and they have solved the
problem by using --ppid instead of -pid).
The reasons of this are still unknown.
I'm going to try your solution, and see if this makes some things better.
Original comment by alessand...@gmail.com
on 31 Aug 2009 at 9:00
I was experiencing similar issues as mikeytrw on Centos 5.3 server, and wanted
to confirm if child process
from the parent(PushMonitor needed killing). It turns out that it's managed
fine, and you dont need to kill all
child processes that belong to the parent, since only one happens at a time.
I stuck in the code fragment before i sent a message to see what child id's
there are and forced it to fail by
choosing an invalid server ip for the client. it found the one child process
and the ps command to find the
process.
$moo = getmypid(); //get parent pid (PushMonitor.php)
$pids = preg_split('/\s+/', `ps -F --ppid $moo`); //confirm what ps pulled up
print_r($pids);
and i guess one modification on mikeytrw's code that i would put is
replace:
proc_terminate($this->pointer);
with:
if(!proc_terminate($this->pointer)){
posix_kill($ppid, 9); //if it cannot terminate pointer,kill 9
}
i guess just incase it can't terminate for whatever reason, it can still kill
the process. someone can correct me
if this is redundant.
Original comment by vincent....@gmail.com
on 10 Sep 2009 at 8:28
Original issue reported on code.google.com by
mikey...@gmail.com
on 28 Aug 2009 at 11:54