note 97012 added to function.proc-open

From: Date: Sun, 28 Mar 2010 15:39:34 +0000
Subject: note 97012 added to function.proc-open
Groups: php.notes 
Request: Send a blank email to php-notes+get-167461@lists.php.net to get a copy of this message
It seems that stream_get_contents() on STDOUT blocks infinitly under Windows when STDERR is filled under some circumstances. The trick is to open STDERR in append mode ("a"), then this will work, too. <?php $descriptorspec = array( 0 => array('pipe', 'r'), // stdin 1 => array('pipe', 'w'), // stdout 2 => array('pipe', 'a') // stderr ); ?> ---- Server IP: 62.2.182.223 Probable Submitter: 84.75.188.2 ---- Manual Page -- http://www.php.net/manual/en/function.proc-open.php Edit -- https://master.php.net/note/edit/97012 Del: integrated -- https://master.php.net/note/delete/97012/integrated Del: useless -- https://master.php.net/note/delete/97012/useless Del: bad code -- https://master.php.net/note/delete/97012/bad+code Del: spam -- https://master.php.net/note/delete/97012/spam Del: non-english -- https://master.php.net/note/delete/97012/non-english Del: in docs -- https://master.php.net/note/delete/97012/in+docs Del: other reasons-- https://master.php.net/note/delete/97012 Reject -- https://master.php.net/note/reject/97012 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167461) next »