Giter Site home page Giter Site logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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 [email protected] on 31 Aug 2009 at 9:00

  • Changed state: Accepted

from php-apns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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 [email protected] on 10 Sep 2009 at 8:28

from php-apns.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.