note 106502 added to function.proc-open
| From: | toby at globaloptima dot co dot uk | Date: | Mon, 14 Nov 2011 21:38:03 +0000 |
| Subject: | note 106502 added to function.proc-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184441@lists.php.net to get a copy of this message | ||
If script A is spawning script B and script B pushes a lot of data to stdout without script A
consuming that data, script B is likely to hang but the result of proc_get_status on that process
seems to continue to indicate it's running.
So either don't write to stdout i the spawned process (I write to log files instead now) or try
to read in the stdout in a non-blocking way if your script A is spawning many instances of script B,
I couldn't get this second option to work sadly.
PHP 5.3.8 CLI on Windows 7 64.
----
Server IP: 69.147.83.197
Probable Submitter: 81.149.49.20
----
Manual Page -- http://www.php.net/manual/en/function.proc-open.php
Edit -- https://master.php.net/note/edit/106502
Del: integrated -- https://master.php.net/note/delete/106502/integrated
Del: useless -- https://master.php.net/note/delete/106502/useless
Del: bad code -- https://master.php.net/note/delete/106502/bad+code
Del: spam -- https://master.php.net/note/delete/106502/spam
Del: non-english -- https://master.php.net/note/delete/106502/non-english
Del: in docs -- https://master.php.net/note/delete/106502/in+docs
Del: other reasons-- https://master.php.net/note/delete/106502
Reject -- https://master.php.net/note/reject/106502
Search -- https://master.php.net/manage/user-notes.php