note 99479 deleted from function.pcntl-fork by danbrown
| From: | danbrown@php.net | Date: | Thu, 19 Aug 2010 15:14:12 +0000 |
| Subject: | note 99479 deleted from function.pcntl-fork by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171853@lists.php.net to get a copy of this message | ||
Note Submitter: cmyk777 at gmail dot com
----
As suggested by some guy who's comment was for some reason deleted, lines
<?php
//Kill parent process now (self) to prevent zombie creation.
posix_kill(posix_getpid(), SIGTERM);
?>
Can be replaced with:
<?php
pcntl_signal(SIGCHLD, SIG_IGN);
?>
But latter can be platform-dependent (see http://en.wikipedia.org/wiki/SIGCHLD), personally i
tested this solution on Linux 2.6.34-12 and FreeBSD 8.0 and it works perfectly.