Skip to content

spawn_with_attributes for Command on #7238

@heaths

Description

@heaths

Is your feature request related to a problem? Please describe.

To have a process write to a pseudoterminal (pty) on Windows, you need to adjust its thread proc attributes. There's currently no way to do this with tokio::process::Command.

Describe the solution you'd like

It would be great if tokio added support on Windows like the nightly CommandExt::spawn_with_attributes. I'd be happy to submit a PR.

Describe alternatives you've considered

I'm using std currently and reading in a spawned task not only is this the only place I'm using std::process::Command instead of tokio's, but without all your async plumbing I'm having trouble waiting for a BufReader to finish after the process terminates. This already works correctly with tokio.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tokioArea: The main tokio crateC-feature-requestCategory: A feature request.M-processModule: tokio/process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions