Annotation of embedaddon/php/ext/standard/tests/general_functions/bug34794.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #34794 (proc_close() hangs when used with two processes)
3: --SKIPIF--
4: <?php
5: if (!is_executable('/bin/cat')) echo 'skip cat not found';
6: ?>
7: --FILE--
8: <?php
9: echo "Opening process 1\n";
10: $process1 = proc_open('/bin/cat', array(0 => array('pipe', 'r'), 1 =>array('pipe', 'r')), $pipes1);
11:
12: echo "Opening process 2\n";
13: $process2 = proc_open('/bin/cat', array(0 => array('pipe', 'r'), 1 =>array('pipe', 'r')), $pipes2);
14:
15:
16: echo "Closing process 1\n";
17: fclose($pipes1[0]);
18: fclose($pipes1[1]);
19: proc_close($process1);
20:
21: echo "Closing process 2\n";
22: fclose($pipes2[0]);
23: fclose($pipes2[1]);
24: proc_close($process2);
25:
26: echo "Done\n";
27:
28: ?>
29: --EXPECTF--
30: Opening process 1
31: Opening process 2
32: Closing process 1
33: Closing process 2
34: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>