Skip to content

Please use PROC_THREAD_ATTRIBUTE_HANDLE_LIST in std::process::Command on Windows Vista and later #73281

Closed
@ghost

Description

On Windows Vista and later, PROC_THREAD_ATTRIBUTE_HANDLE_LIST can be used to programmatically control which handles are inherited, and the mutex here can be removed.
An example from Chromium: https://github.com/chromium/chromium/blob/2175a6f74e264dd7d540e5c59e73a9460a716727/base/process/launch_win.cc#L233.
There is a blog about it: https://devblogs.microsoft.com/oldnewthing/20111216-00/?p=8873.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.O-windowsOperating system: WindowsT-libsRelevant to the library 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