note 98534 added to function.pcntl-wait
| From: | digitalaudiorock at gmail dot com | Date: | Mon, 21 Jun 2010 21:44:27 +0000 |
| Subject: | note 98534 added to function.pcntl-wait | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170353@lists.php.net to get a copy of this message | ||
I was unable to get pcntl_wait or pcntl_waitpid to terminate when I had an active signal handler. I
then noticed the post below from gaylord at 100days dot de, however I'm a little confused by
that post as I found the exact opposite to be true. The default value of the third parameter of
pcntl_signal (the restart_syscalls parameter) is true and this seems to cause the wait to continue
when the signal arrives. In order to prevent this I had to expressly set it to false. That is:
pcntl_signal(SIGTERM, 'my_handler_function', false);
----
Server IP: 69.147.83.197
Probable Submitter: 68.192.144.117
----
Manual Page -- http://www.php.net/manual/en/function.pcntl-wait.php
Edit -- https://master.php.net/note/edit/98534
Del: integrated -- https://master.php.net/note/delete/98534/integrated
Del: useless -- https://master.php.net/note/delete/98534/useless
Del: bad code -- https://master.php.net/note/delete/98534/bad+code
Del: spam -- https://master.php.net/note/delete/98534/spam
Del: non-english -- https://master.php.net/note/delete/98534/non-english
Del: in docs -- https://master.php.net/note/delete/98534/in+docs
Del: other reasons-- https://master.php.net/note/delete/98534
Reject -- https://master.php.net/note/reject/98534
Search -- https://master.php.net/manage/user-notes.php