Skip to content

[Process][FR] Add an option to redirect any output to /dev/null #9007

Closed
@romainneutron

Description

@romainneutron

As well as it could be nice to flush the output, discarding it could be nice in term of memory consumption for long process where output is not needed.

In terms of proc_open descriptors, it consists in :

$nullfile = defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null';
$descriptors = array(
    1 => array("file", $nullfile, "a+"),
    2 => array("file", $nullfile, "a+"),
);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions