note 114234 added to function.pcntl-signal-dispatch

From: Date: Mon, 27 Jan 2014 17:33:41 +0000
Subject: note 114234 added to function.pcntl-signal-dispatch
Groups: php.notes 
Request: Send a blank email to php-notes+get-198365@lists.php.net to get a copy of this message
Note that calling pcntl_signal_dispatch() from within a signal handler invoked by a previous pcntl_signal_dispatch() will not trigger handlers for any new pending signals. This means that if you write a CLI daemon which forks off child processes in response to a signal, then those child processes won't be able to respond to signals. This gave me a headache for a while as pcntl_signal_dispatch() doesn't raise any errors when this occurs. One solution is to set a flag within the signal handler and react upon it (by forking off the needed child processes) elsewhere in the parent process's main loop. ---- Server IP: 147.32.160.17 Probable Submitter: 90.179.139.240 ---- Manual Page -- http://php.net/manual/en/function.pcntl-signal-dispatch.php Edit -- https://master.php.net/note/edit/114234 Del: integrated -- https://master.php.net/note/delete/114234/integrated Del: useless -- https://master.php.net/note/delete/114234/useless Del: bad code -- https://master.php.net/note/delete/114234/bad+code Del: spam -- https://master.php.net/note/delete/114234/spam Del: non-english -- https://master.php.net/note/delete/114234/non-english Del: in docs -- https://master.php.net/note/delete/114234/in+docs Del: other reasons-- https://master.php.net/note/delete/114234 Reject -- https://master.php.net/note/reject/114234 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198365) next »