Repository navigation
Add StandardInputHandle/OutputHandle/ErrorHandle SafeFileHandle properties to ProcessStartInfo #125848
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 36 commits into
main
from
copilot/add-standard-input-output-properties
Mar 26, 2026
Merged
Add StandardInputHandle/OutputHandle/ErrorHandle SafeFileHandle properties to ProcessStartInfo #125848
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
f47b2fd
Refactor StartCore to accept SafeFileHandle parameters; move pipe cre…
Copilot fea2a80
Fix build errors: XML doc comments and unsafe partial mismatch; add I…
Copilot 07d9369
Address PR feedback: remove partial methods, use SafeFileHandle.Creat…
Copilot b65842b
address my own feedback
adamsitnik 43b6301
more polishing after reading the code again
adamsitnik dc85b03
fix Unix build
adamsitnik 9ee1881
trigger the CI as it seems to got stuck
adamsitnik 17bc483
fix the tests:
adamsitnik c9c55f0
Merge branch 'main' into copilot/refactor-startcore-method-arguments
adamsitnik 7cf7f0c
handle INVALID_HANDLE_VALUE on Windows
adamsitnik 2c8c444
address code review feedback: don't use Console.OpenStandard*Handle o…
adamsitnik bba0144
Make Console.OpenStandard*Handle APIs work on Android by returning fd…
Copilot 7a345e2
Revert "Make Console.OpenStandard*Handle APIs work on Android by retu…
adamsitnik b362a72
address code review feedback: don't dup 0/1/2 on Unix
adamsitnik 419d7ab
Add StandardInput/Output/Error SafeFileHandle properties to ProcessSt…
Copilot 18995de
Remove unrelated files from commit
Copilot d40cf18
Address code review: fix pipe handle cleanup in tests
Copilot 60844f3
Address review feedback: reuse CantRedirectStreams, add LeaveHandlesO…
Copilot c8b8723
Address feedback: handles don't need to be inheritable, mention OpenN…
Copilot 12edafb
Merge branch 'main' into copilot/refactor-startcore-method-arguments
adamsitnik 6718589
Only create pipe handles for redirected streams, update callers to ha…
Copilot 6ddf417
Fix usesTerminal logic: null handle means child inherits parent's str…
Copilot dfec029
Merge branch 'main' into copilot/refactor-startcore-method-arguments
adamsitnik 4199424
Merge branch 'main' into copilot/refactor-startcore-method-arguments
adamsitnik 0aa6fcf
Merge branch 'copilot/refactor-startcore-method-arguments' into copil…
adamsitnik 017f286
Address review feedback: simplify test try/catch, remove manual Close…
Copilot 95247af
address my own feedback:
adamsitnik 7920b52
Rename StandardInput/Output/Error to StandardInputHandle/OutputHandle…
Copilot 477224c
don't duplicate the handle if it's inheritable already
adamsitnik a914e57
remove LeaveHandlesOpen
adamsitnik 7c1fa73
improve wording
adamsitnik c0ecbbc
address code review feedback
adamsitnik e30abcc
Apply suggestions from code review
adamsitnik e81296d
Fix ValidateHandle order and use fully qualified XML doc cref names
Copilot 0f57884
Apply suggestions from code review
adamsitnik 354126b
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
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
30 changes: 30 additions & 0 deletions
30
...mon/src/Interop/Unix/System.Native/Interop.IsAtomicNonInheritablePipeCreationSupported.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| internal static partial class Interop | ||
| { | ||
| internal static partial class Sys | ||
| { | ||
| [LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_IsAtomicNonInheritablePipeCreationSupported", SetLastError = false)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| private static partial bool IsAtomicNonInheritablePipeCreationSupportedImpl(); | ||
|
|
||
| private static NullableBool s_atomicNonInheritablePipeCreationSupported; | ||
|
|
||
| internal static bool IsAtomicNonInheritablePipeCreationSupported | ||
| { | ||
| get | ||
| { | ||
| NullableBool isSupported = s_atomicNonInheritablePipeCreationSupported; | ||
| if (isSupported == NullableBool.Undefined) | ||
| { | ||
| s_atomicNonInheritablePipeCreationSupported = isSupported = IsAtomicNonInheritablePipeCreationSupportedImpl() ? NullableBool.True : NullableBool.False; | ||
| } | ||
| return isSupported == NullableBool.True; | ||
| } | ||
| } | ||
| } | ||
| } |
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.