note 99435 added to function.pcntl-fork
| From: | cbn at grenet dot org | Date: | Tue, 17 Aug 2010 14:26:26 +0000 |
| Subject: | note 99435 added to function.pcntl-fork | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171766@lists.php.net to get a copy of this message | ||
@cmyk777 at gmail dot com :
I am not sure to understand your script...
If you kill your parent process, it will kill all its children, probably before your time consuming
job would be finished (?)
Usually you have to tell your master process to pcntl_wait() for all the workers, and then exit().
You can also use pcntl_signal(SIGCHLD, SIG_IGN) to avoid zombies, that is probably what you are
looking for (it works under Linux 2.6).
----
Server IP: 69.147.83.197
Probable Submitter: 194.206.220.193
----
Manual Page -- http://www.php.net/manual/en/function.pcntl-fork.php
Edit -- https://master.php.net/note/edit/99435
Del: integrated -- https://master.php.net/note/delete/99435/integrated
Del: useless -- https://master.php.net/note/delete/99435/useless
Del: bad code -- https://master.php.net/note/delete/99435/bad+code
Del: spam -- https://master.php.net/note/delete/99435/spam
Del: non-english -- https://master.php.net/note/delete/99435/non-english
Del: in docs -- https://master.php.net/note/delete/99435/in+docs
Del: other reasons-- https://master.php.net/note/delete/99435
Reject -- https://master.php.net/note/reject/99435
Search -- https://master.php.net/manage/user-notes.php