[php-src] Issue #10239: proc_close after proc_get_status always returns -1
Issue: https://github.com/php/php-src/issues/10239
Author: pezcurrel
### Description
The following code:
```
<?php
$p = proc_open('sleep 1', array(), $foo);
do {
usleep(100000);
$s = proc_get_status($p);
echo $s['running'] ? 'Running' : 'Finished', PHP_EOL;
} while ($s['running']);
$q = proc_open('sleep 3600', array(), $foo);
echo proc_close($p), PHP_EOL;
```
Resulted in this output:
```
Running
Running
Running
...
Finished
0
```
But I expected this output instead:
```
Running
Running
Running
...
Finished
-1
```
### PHP Version
PHP 8.1.13
### Operating System
Arch Linux
Thread (1 message)
- pezcurrel