note 102767 added to features.commandline.io-streams

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.