Comments (2)
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.
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)
- Explain how to use HOT 16
- Use of PHP_NORMAL_READ not compatible with PHP 5.2.9 apparantly.
- Error while starting child process HOT 9
- looking for someone to help us to implement APNS server side using this code HOT 1
- Start on boot HOT 2
- PushService not detecting fwrite failure HOT 1
- Requirements
- Memory Leak
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-apns.