Add ProcessExitStatus class to System.Diagnostics.Process#124264
Add ProcessExitStatus class to System.Diagnostics.Process#124264adamsitnik merged 10 commits intomainfrom
Conversation
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
adamsitnik
left a comment
There was a problem hiding this comment.
@copilot address my feedback
src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs
Outdated
Show resolved
Hide resolved
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process |
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new System.Diagnostics.ProcessExitStatus public type to represent process termination state (exit code, optional POSIX signal, and cancellation/timeout termination), along with unit tests and project file wiring to compile/ship the new API.
Changes:
- Added new public API
ProcessExitStatus(ref + implementation) inSystem.Diagnostics.Process. - Wired the new source file into the product csproj and added a new unit test file.
- Added unit tests validating constructor/property behavior for multiple parameter combinations.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj | Includes the new ProcessExitStatusTests.cs test file in compilation. |
| src/libraries/System.Diagnostics.Process/tests/ProcessExitStatusTests.cs | Adds unit tests for ProcessExitStatus constructor/property combinations. |
| src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs | Implements the new public ProcessExitStatus class with XML docs. |
| src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj | Adds ProcessExitStatus.cs to the product compilation list. |
| src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs | Adds the ProcessExitStatus public ref-surface declaration. |
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs
Outdated
Show resolved
Hide resolved
|
@copilot please invoke the code-review skill and post your analysis/results as a comment on this PR |
…rty name Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Head branch was pushed to by a user without write access
|
@copilot please address the feedback |
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Addressed the remaining reviewer feedback — clarified the |
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Show resolved
Hide resolved
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessExitStatus.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Removed platform-specific remarks about exit codes.
Implementation Plan for ProcessExitStatus
ProcessExitStatusto reference file (ref/System.Diagnostics.Process.cs)ProcessExitStatusimplementation insrc/System/Diagnostics/ProcessExitStatus.csProcessExitStatuscancelledtocanceledto matchCanceledpropertyThe API got approved in #123380 (comment)
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.