-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add ProcessStartInfo.InheritedHandles to restrict child process handle inheritance #126318
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
Merged
adamsitnik
merged 48 commits into
main
from
copilot/add-inherited-handles-to-processstartinfo
Apr 8, 2026
Merged
Changes from 32 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
f3816af
Implement ProcessStartInfo.InheritedHandles
Copilot c7503e1
Fix code review issues: UseShellExecute/UserName validation, Dangerou…
Copilot 85e9d43
Address review feedback: WASI stub, close_range detection, STARTUPINF…
Copilot 30ff3b9
Address second round: remove old interop overloads, refactor helpers,…
Copilot 69f393b
Fix -Wunused-macros: move CLOSE_RANGE_CLOEXEC inside the #if branches…
Copilot 6d4cbac
Address review feedback: merge interop files, fix style, simplify tes…
Copilot d6f01d1
minor pedantic changes
adamsitnik b6db80d
Address jkotas feedback: void* P/Invoke, pointer params, doc fix, Use…
Copilot 27bad09
fix the build and address some of the feedback
adamsitnik f660c7d
use CreateProcessAsUser when InheritedHandles are specified because C…
adamsitnik a6df62e
Merge remote-tracking branch 'origin/main' into copilot/add-inherited…
adamsitnik a94ee2b
address code review feedback: define __NR_close_range on our own
adamsitnik aea3030
Add SetCloexecForAllFds fallback and use #elif defined(__NR_close_range)
Copilot 7d75ed0
Fix LogonUser mapping, CleanupHandles, AddRef tracking, InheritedHand…
Copilot 5de4694
Merge remote-tracking branch 'origin/main' into copilot/add-inherited…
adamsitnik b64b336
address my own feedback
adamsitnik e91e6d7
Address new review feedback: fix startupInfo.cb, Unix DangerousAddRef…
Copilot b9b3dfc
Address remaining feedback: fix missing newline in tests, restructure…
Copilot 1df471b
Add closefrom(3) support for inheritedFdCount==0 case in pal_process.c
Copilot 9882f40
Rename SetCloexecForAllFds to SetCloexecForAllFdsFallback; use close_…
Copilot 91b38ae
address my own feedback:
adamsitnik 8f41ae7
Fix exec error pipe corruption in RestrictHandleInheritance; document…
Copilot 1d9b856
add tests for the CreateProcessAsUserW code path
adamsitnik 5dab8c8
remove everything related to CreateProcessAsUser, it's too restrictiv…
adamsitnik e435263
Address PR feedback: fix XML docs, bInheritHandles edge case, P/Invok…
Copilot c31f50f
fix the tests on Unix (PasswordInClearText throws PNSE)
adamsitnik 9a41359
Add InheritedHandlesMayNotContainNull resource string and use it in v…
Copilot d714892
Apply suggestions from code review
adamsitnik 60d5b7e
address code review feedback
adamsitnik aaea340
Merge remote-tracking branch 'origin/main' into copilot/add-inherited…
adamsitnik fa3eb95
various improvements:
adamsitnik 9b81e9b
address code review feedback:
adamsitnik 3945b90
address feedback: use arch-specific list for __NR_close_range in pal_…
Copilot b8bd738
Apply suggestions from code review
adamsitnik 9c94f3b
Merge remote-tracking branch 'origin/main' into copilot/add-inherited…
adamsitnik 5f644b2
Revert "address feedback: use arch-specific list for __NR_close_range…
adamsitnik 428f69e
address code review feedback:
adamsitnik 1f9f507
address code review feedback:
adamsitnik b4ff883
Merge branch 'main' into copilot/add-inherited-handles-to-processstar…
jkotas b762e6a
sort ref assembly members alphabetically in SafeProcessHandle and Pro…
Copilot 43a2caa
address code review feedback:
adamsitnik cdbc06c
address jkotas review feedback: fix handle check, test flakiness, err…
Copilot 36fac4d
Update SafeProcessHandle.Windows.cs
adamsitnik 8aeddd4
Address review feedback: add per-architecture __NR_close_range fallba…
Copilot 6c1eb57
address code review feedback
adamsitnik b8d56a5
Address jkotas review:
Copilot 478ded6
address code review feedback:
adamsitnik 79f91d0
Apply suggestions from code review
adamsitnik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.