1--TEST-- 2GH-10239 (proc_close after proc_get_status always returns -1) 3--SKIPIF-- 4<?php 5if (PHP_OS != "Linux") die("skip, only for linux"); 6if (getenv("SKIP_SLOW_TESTS")) die('skip slow test'); 7?> 8--FILE-- 9<?php 10$p = proc_open('false', array(), $foo); 11usleep(2 * 1000 * 1000); 12var_dump(proc_get_status($p)); 13var_dump(proc_get_status($p)); 14?> 15--EXPECTF-- 16array(9) { 17 ["command"]=> 18 string(5) "false" 19 ["pid"]=> 20 int(%d) 21 ["cached"]=> 22 bool(true) 23 ["running"]=> 24 bool(false) 25 ["signaled"]=> 26 bool(false) 27 ["stopped"]=> 28 bool(false) 29 ["exitcode"]=> 30 int(1) 31 ["termsig"]=> 32 int(0) 33 ["stopsig"]=> 34 int(0) 35} 36array(9) { 37 ["command"]=> 38 string(5) "false" 39 ["pid"]=> 40 int(%d) 41 ["cached"]=> 42 bool(true) 43 ["running"]=> 44 bool(false) 45 ["signaled"]=> 46 bool(false) 47 ["stopped"]=> 48 bool(false) 49 ["exitcode"]=> 50 int(1) 51 ["termsig"]=> 52 int(0) 53 ["stopsig"]=> 54 int(0) 55} 56