Skip to content

Failure to spawn on Windows if stdio handles are null #31167

Closed
@alexcrichton

Description

@alexcrichton

As reported here, if one of the stdio handles for a Windows process is unset (e.g. isn't present) then you won't actually be able to spawn a process by default. All handles are set, by default, to "inherit", but this currently means duplicate the existing handle, which in turn means that if the stdio handle isn't present this operation will fail.

Rust currently defends against this by always opening up handles even if Stdio::null() is specified (just pointing them to a blank stream), but Rust should also defend against this situation when it was spawned from elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions