From 1a2a8c6d4e62f8a3f21e8d82f6b5a2a943d63e7e Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 29 Sep 2014 20:18:33 +0200 Subject: one more test to illustrate transfer of an arbitrary data amount throug pipes --- .../tests/streams/proc_open_bug51800_right2.phpt | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 ext/standard/tests/streams/proc_open_bug51800_right2.phpt diff --git a/ext/standard/tests/streams/proc_open_bug51800_right2.phpt b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt new file mode 100644 index 0000000000..69c75cf263 --- /dev/null +++ b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt @@ -0,0 +1,84 @@ +--TEST-- +Bug #51800 proc_open on Windows hangs forever, the right way to do it with more data +--FILE-- + array("pipe", "rb"), // stdin + 1 => array("pipe", "wb"), // stdout + 2 => array("pipe", "wb") // stderr + ); + +/* create the proc file */ +$r = file_put_contents($callee, ' $status, + "stdout" => $stdout, + "stderr" => $stderr, +), strlen($stdout), strlen($stderr)); + +?> +===DONE=== +--CLEAN-- + +--EXPECTF-- +array(3) { + ["status"]=> + int(0) + ["stdout"]=> + string(1000000) "a%s" + ["stderr"]=> + string(1000000) "b%s" +} +int(1000000) +int(1000000) +===DONE=== + -- cgit v1.2.1