note 102767 added to features.commandline.io-streams
| From: | AurelienMarchand at osu1 dot php dot net | Date: | Fri, 04 Mar 2011 16:10:22 +0000 |
| Subject: | note 102767 added to features.commandline.io-streams | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177568@lists.php.net to get a copy of this message | ||
Please remember in multi-process applications (which are best suited under CLI), that I/O operations
often will BLOCK signals from being processed.
For instance, if you have a parent waiting on fread(STDIN), it won't handle SIGCHLD, even if
you defined a signal handler for it, until after the call to fread has returned.
Your solution in this case is to wait on stream_select() to find out whether reading will block.
Waiting on stream_select(), critically, does NOT BLOCK signals from being processed.
Aurelien
----
Server IP: 66.207.199.35
Probable Submitter: 209.202.82.139
----
Manual Page -- http://www.php.net/manual/en/features.commandline.io-streams.php
Edit -- https://master.php.net/note/edit/102767
Del: integrated -- https://master.php.net/note/delete/102767/integrated
Del: useless -- https://master.php.net/note/delete/102767/useless
Del: bad code -- https://master.php.net/note/delete/102767/bad+code
Del: spam -- https://master.php.net/note/delete/102767/spam
Del: non-english -- https://master.php.net/note/delete/102767/non-english
Del: in docs -- https://master.php.net/note/delete/102767/in+docs
Del: other reasons-- https://master.php.net/note/delete/102767
Reject -- https://master.php.net/note/reject/102767
Search -- https://master.php.net/manage/user-notes.php