Skip to content

[wishlist] portable way to pipe one command’s stdout to another’s stdin #34593

@nagisa

Description

@nagisa

Currently piping output between two commands involves going through raw handles and filedescriptors which requires #[cfg]d code and imports or spawning a thread and juggling data between two streams manually.

Ideally the API would be as simple as this:

let pipe = Stdio::interprocess_pipe();
let cmd1 = ….stdout(pipe.clone()).spawn();
let cmd2 = ....stdin(pipe).status();

or something along the lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions