Skip to content

PHP sub-processes: Source stderr output from php://stderr, not /tmp/stderr #1071

Open
@adamziel

Description

@adamziel

#1069 introduced a sub-process spawning mechanics. Unfortunately, it got something wrong – it mocks a CLI environment by defining STDIN, STDOUT, and STDERR streams, and the STDERR stream points to the /tmp/stderr file which got renamed to /internal/stderr:

define('STDIN', fopen('php://stdin', 'rb'));
define('STDOUT', fopen('php://stdout', 'wb'));
define('STDERR', fopen('/tmp/stderr', 'wb'));

It should either be updated to /internal/stderr or to php://stderr actually. I'm not sure if the latter would work. These defines were originally explored in #161 and, at that time, there was a bug preventing the use of php://stderr.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions