Looping the process closing from its pipes causes a fatal error.
For complex chains with guaranteed closing, the following error may occur:
TypeError: proc_close(): Argument #1 ($process) must be of type resource, null given
/app/src/Process.php:312
...
This error occurs, for example, for the following code:
$process = new Process("...");
$process->start();
$process->stdout->on("close", [$process, "close"]); // through some chain
$process->close();