Bug #69900 [Opn]: Commandline input/output weird behaviour

From: Date: Sun, 28 Jun 2015 14:50:36 +0000
Subject: Bug #69900 [Opn]: Commandline input/output weird behaviour
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193963@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69900&edit=1 ID: 69900 User updated by: nerdbeere2k at gmail dot com Reported by: nerdbeere2k at gmail dot com Summary: Commandline input/output weird behaviour Status: Open Type: Bug Package: *General Issues Operating System: Windows PHP Version: 5.5.26 Block user comment: N Private report: N New Comment: Hello ab, i didnt have time to respond until now, but i hope this still helps. i set up a vm and tested this on debian and can confirm that this is a windows only issue! Previous Comments: ------------------------------------------------------------------------ [2015-06-26 20:19:29] ab@php.net @nerdbeere2k, thanks for the additional input. Ok, i've compiled your java snippet and tested on windows and linux. It clearly shows, that it's a Windows only issue. Were nice if you could confirm that. Also it shows that proc_open isn't involved. Still i suspect pipe handling. But this already gives the direction to debug. Thanks. ------------------------------------------------------------------------ [2015-06-25 18:50:55] nerdbeere2k at gmail dot com Hello ab, first: thanks again for replying! i must admit i didnt test my last code snippet with Linux, but initially i got a report for my java application which stated that it'd run very slow since upgrading php to 5.6. The environment from that report is Linux, and after i investigated the problem i supposed that this was the source of the problem without specifically testing it on Linux... So i might've been wrong, and if you say so, i probably was and i'm sorry for that! I will take Linux out of the OS list. Concerning proc_open(): i don't think the problem is related to proc_open(), because the java and the php snippet basically do the same thing and the timings and output of both are pretty much equal... I'm also not sure what we're investigating on :) i had hoped maybe someone had an idea what to do! What would you advise? ------------------------------------------------------------------------ [2015-06-25 13:15:46] ab@php.net Thanks for the second code snippet. However it turns the ticket to completely different story. When I run it, i reproduce your findings on Windows, but not on Linux. It might be related on Windows to bugfixes to the proc_open as it previously could block while reading/writing pipes from the child. You initially say it's reproducable on both Linux/Windows and the initial snippet doesn't involve proc_open(). So I'm just not sure what we're investigating on :) Is the last one the code reproducing your exact situation? If not, it's probably worth to workout a snippet not involving proc_open(). Thanks. ------------------------------------------------------------------------ [2015-06-25 07:31:54] nerdbeere2k at gmail dot com Status Open ------------------------------------------------------------------------ [2015-06-24 11:22:07] nerdbeere2k at gmail dot com By the way, if you call the process like this: $process = proc_open(PHP_BINARY.' <?php while(!feof(STDIN)){ $s = fgets(STDIN); fwrite(STDOUT, $s); } ?>', $descriptorspec, $pipes); The problem doesnt occur... just in case someone wonders why i used two separate files. ------------------------------------------------------------------------ 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=69900 -- Edit this bug report at https://bugs.php.net/bug.php?id=69900&edit=1

« previous php.bugs (#193963) next »