Skip to content

Looping closing a process from its pipes causes a critical error #116

@7-zete-7

Description

@7-zete-7

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions