fix to allow proc_open() to accept php://stdin as stdin
[hiphop-php.git] / hphp / test / slow / ext_process / proc_open.php
blob8328cc0e5195e5420877fe9d55d766bb25ce16f4
1 <?php
3 function test_me($desc) {
4 $pipes = null;
5 $process = proc_open(__DIR__."/test_proc_open.sh", $desc, $pipes);
6 $status = proc_get_status($process);
7 pcntl_waitpid($status["pid"], $child_status);
10 $desc = array(array("file", "php://stdin", "r"));
11 test_me($desc);
13 $desc = array(array("file", __DIR__ . "/test_proc_open.txt", "r"));
14 test_me($desc);
16 $desc = array(array("file", __DIR__, "r"));
17 test_me($desc);
19 $desc = array(array("file", "php://fd/0", "r"));
20 test_me($desc);
22 $desc = array(array("file", "php://temp", "r"));
23 test_me($desc);
25 $desc = array(array("file", "php://memory", "r"));
26 test_me($desc);