Skip to content

Can't pipe stdout/stderr to the same pipe for a child process #10269

Closed
@alexcrichton

Description

@alexcrichton

This is more of a problem with the rt::io::process bindings rather than the std::run bindings (the latter needs a larger overhaul in general). The rt::io::process bindings currently don't expose the ability to have something like 2>&1 and then you capture the output of &1 (redirecting stderr to stdout and then reading stdout).

A possible solution is to add another enum variant to StdioContainer named along the lines of PipeTo(int) which means that the output of this stdio slot should get redirected to the pipe which was defined at slot int. Perhaps an IoError should be raised if it doesn't reference a CreatePipe slot, perhaps a failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions