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('sleep 1', array(), $foo);
11do {
12    usleep(100000);
13    $s = proc_get_status($p);
14} while ($s['running']);
15echo proc_close($p), PHP_EOL;
16?>
17--EXPECT--
180
19