-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add ProcessExitStatus class to System.Diagnostics.Process #124264
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
adamsitnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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>
adamsitnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
🤖 Copilot Code Review — PR #124393Holistic AssessmentMotivation: This PR implements the Approach: The implementation is a straightforward sealed class matching the approved API shape exactly. No alternative approach is warranted for a simple DTO type. Summary: Detailed Findings✅ API Shape — Matches approved API exactlyThe implementation matches the approved API shape exactly:
The ✅ Ref Assembly — Follows conventions
✅ Project File Wiring — Correct
✅ Implementation — Clean and correct
|
…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 |
adamsitnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Implementation Plan for ProcessExitStatus
ProcessExitStatusto reference file (ref/System.Diagnostics.Process.cs)ProcessExitStatusimplementation insrc/System/Diagnostics/ProcessExitStatus.csProcessExitStatuscancelledtocanceledto matchCanceledproperty✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.