Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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