Skip to content

doc request: example how to inherit stdout/stderr in Command #21570

Closed
@kornelski

Description

@kornelski

std::io::Command by default creates new stdout/stderr for the command.

I don't see an obvious way to make it use same stdout/stderr as the parent process. Could you add an example that shows how to this?

Typically own stdout/stderr is a very desirable behavior, but in Cargo build scripts this hides output of commands and makes debugging difficult, so in that context inherited stdin/stdout is a common and useful use-case.

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