Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Jun 12, 2020 · 2 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-windows Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented Jun 12, 2020

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.

@jonas-schievink jonas-schievink added T-libs Relevant to the library team, which will review and decide on the PR/issue. O-windows Operating system: Windows C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Jun 12, 2020
@retep998
Copy link
Member

Duplicate of #38227 but yes we should absolutely do this.

@ghost
Copy link
Author

ghost commented Jun 13, 2020

Sorry for duplicating it. However, the origin issue seems to be inactive, even it's high priority. Thank @quark-zju for implementing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-windows Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants