Bug #69049 [Fbk->NoF]: Unable to get output of slow process
| From: | php-bugs at lists dot php dot net | Date: | Sun, 22 Feb 2015 04:22:19 +0000 |
| Subject: | Bug #69049 [Fbk->NoF]: Unable to get output of slow process | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190879@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69049&edit=1
ID: 69049
Updated by: php-bugs@lists.php.net
Reported by: aserbulov at parallels dot com
Summary: Unable to get output of slow process
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Streams related
Operating System: Windows
PHP Version: 5.5.21
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2015-02-13 13:58:13] ab@php.net
The pipe needs to be peeked, otherwise in much more cases this will just hang. Especially if
there's a lot of data passed. And we cannot control the pipe buffer size.
Another solution I had in mind for this was using threads. However it's much more complicated
and brings overheads. For every proc_open call a thread or two would have to be started, not sure it
really justifies it.
But otherwise, is the solution i've described at the start with stderr and co. applicable to
your case?
Thanks.
------------------------------------------------------------------------
[2015-02-13 13:49:53] ab@php.net
@aserbulov, yeah, however in practice, if one tries to do the blocking read from the deadlocked pipe
- here we are. Increasing timeout will probably add the idle circles in the simple cases though.
Heh.
------------------------------------------------------------------------
[2015-02-13 13:44:02] ab@php.net
But what is actually missing here is the blocking read. After the first circle it's
errno 2, ret 0, eof 1
Because nothing was available in the pipe ... as we emulate the blocking read now, it might make
sense to just increase the timeout.
Cheers.
------------------------------------------------------------------------
[2015-02-13 13:42:50] aserbulov at parallels dot com
The patch https://bugs.php.net/patch-display.php?bug_id=69049&patch=stream_oef.diff&revision=latest
does not fix particular issue - process hangs forever.
But the idea is correct - set eof to true only if end of the pipe is reached.
------------------------------------------------------------------------
[2015-02-13 13:37:30] ab@php.net
With your patch, the snippet doesn't terminate.
Thanks.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=69049
--
Edit this bug report at https://bugs.php.net/bug.php?id=69049&edit=1