Skip to content

Backport .NET 11 System.Diagnostics.Process API docs from dotnet/runtime - #12888

Merged
gewarren merged 8 commits into
mainfrom
copilot/backport-xml-docs-process-api
Oct 15, 2026
Merged

gewarren merged 8 commits into
mainfrom
copilot/backport-xml-docs-process-api

Conversation

Copilot AI commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Backports XML documentation for all new .NET 11 System.Diagnostics.Process APIs. Previously all new members had "To be added" placeholder docs. All 41 .NET 11-only members across the five affected types now have documentation, with no remaining placeholders. Documentation is verified against the runtime XML comments and implementation, including inherited SafeProcessHandle docs. Generated API metadata is unchanged.

New types

  • ProcessExitStatus — Canceled, ExitCode, Signal properties and constructor
  • ProcessOutputLine — Content, StandardError properties, constructor, and ToString
  • ProcessTextOutput — ExitStatus, ProcessId, StandardError, StandardOutput properties and constructor

Process — 21 new methods

  • ReadAllBytes / ReadAllBytesAsync
  • ReadAllLines / ReadAllLinesAsync — includes remarks on stderr-first ordering
  • ReadAllText / ReadAllTextAsync
  • Run(startInfo) / Run(fileName)
  • RunAndCaptureText(startInfo) / RunAndCaptureText(fileName)
  • RunAndCaptureTextAsync(startInfo) / RunAndCaptureTextAsync(fileName)
  • RunAsync(startInfo) / RunAsync(fileName)
  • StartAndForget(startInfo) / StartAndForget(fileName) — includes remarks on fire-and-forget semantics
  • Signal — includes Windows signal restrictions
  • TryGetProcessById
  • TryWaitForExitStatus / WaitForExitStatus / WaitForExitStatusAsync — includes Unix child-process restrictions and cancellation behavior

ProcessStartInfo — 7 new properties and constructor documentation

  • Constructor overload (fileName, IEnumerable<string>)
  • InheritedHandles — includes detailed remarks on Windows (SetHandleInformation) and Unix (FD_CLOEXEC) handle inheritance behavior, concurrency caveats, and supported handle types
  • KillOnParentExit — includes remarks on Windows Job Objects and Linux prctl(PR_SET_PDEATHSIG) implementation
  • StandardErrorHandle, StandardInputHandle, StandardOutputHandle
  • StartDetached
  • StartSuspended — includes Windows and macOS behavior and how to resume execution

Internal previews

File Preview link
xml/System.Diagnostics/Process.xml Learn preview
xml/System.Diagnostics/ProcessExitStatus.xml Learn preview
xml/System.Diagnostics/ProcessOutputLine.xml Learn preview
xml/System.Diagnostics/ProcessStartInfo.xml Learn preview
xml/System.Diagnostics/ProcessTextOutput.xml Learn preview

Build report

Copilot AI changed the title Backport .NET 11 Process API XML docs from dotnet/runtime Backport .NET 11 System.Diagnostics.Process API docs from dotnet/runtime Jul 20, 2026
Copilot AI requested a review from adamsitnik July 20, 2026 11:26
@adamsitnik
adamsitnik requested a review from Copilot July 20, 2026 11:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports .NET 11 System.Diagnostics.Process-related API reference documentation into this repo, replacing placeholder text for newly introduced types and members so the published docs reflect the new APIs and their behaviors.

Changes:

  • Adds descriptive summaries/values/params for new .NET 11 Process members (including run/capture and stream-reading APIs) and related new types.
  • Documents new ProcessStartInfo members (notably InheritedHandles, KillOnParentExit, standard-handle SafeFileHandle properties, and StartDetached) with detailed platform-specific remarks.
  • Improves constructor/property docs for ProcessExitStatus, ProcessOutputLine, and ProcessTextOutput.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
xml/System.Diagnostics/ProcessTextOutput.xml Replaces placeholder summaries/param docs for ProcessTextOutput and its members.
xml/System.Diagnostics/ProcessStartInfo.xml Adds detailed docs/remarks for new .NET 11 members such as handle inheritance, parent-exit behavior, and standard handle properties.
xml/System.Diagnostics/ProcessOutputLine.xml Documents the new ProcessOutputLine type and its members.
xml/System.Diagnostics/ProcessExitStatus.xml Documents the new ProcessExitStatus type, including Unix signal semantics.
xml/System.Diagnostics/Process.xml Documents new .NET 11 Process APIs for running processes and reading/capturing output.

Comment thread xml/System.Diagnostics/Process.xml Resolved

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot address the feedback

Comment thread xml/System.Diagnostics/Process.xml Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Preserve updated API metadata, restore member boundaries, and document the new silent parameters.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 35e2360c-54a8-4989-85bd-72b67d15b5b1
All five unresolved threads report missing ProcessStartInfo member boundaries. The preceding merge restores KillOnParentExit, LoadUserProfile, StandardInputEncoding, StandardOutputEncoding, and UseCredentialsForNetworkingOnly as separate members. XML parsing, member counts against main, and one DocId and Docs element per member were verified.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 35e2360c-54a8-4989-85bd-72b67d15b5b1
Correct the SafePipeHandle cross-reference and standard handle defaults. Document ProcessOutputLine.ToString, default initialization, and null content rejection. Clarify run redirection restrictions, canceled exit status, capture timeout and cancellation behavior, executable arguments, and empty file-name rejection. Preserve all generated API metadata.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 35e2360c-54a8-4989-85bd-72b67d15b5b1
@adamsitnik
adamsitnik marked this pull request as ready for review October 9, 2026 10:28
@adamsitnik
adamsitnik requested a review from a team as a code owner October 9, 2026 10:28
@adamsitnik
adamsitnik requested a balanced review from Copilot October 9, 2026 10:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address review discussion r4229166602 for StandardErrorHandle, StandardInputHandle, and StandardOutputHandle. Explain that StartAndForget redirects missing handles to the null device rather than inheriting them.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 35e2360c-54a8-4989-85bd-72b67d15b5b1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Seven synchronous timeout overloads omit their guaranteed ArgumentOutOfRangeException behavior.

0 open findings

1 resolved since last review
Previously missed (3)

In code that hasn't changed since last review

Low severity Document timeout range ArgumentOutOfRangeException

xml/​System.Diagnostics/​Process.xml:3773

A non-null timeout is converted with ProcessUtils.ToTimeoutMilliseconds, which throws ArgumentOutOfRangeException when it is outside the supported range. The new exception list omits this guaranteed failure, so callers aren't told which timeout values are valid.

This issue also appears in the following locations of the same file:

  • line 3855
  • line 3937
Low severity Document timeout validation exception

xml/​System.Diagnostics/​Process.xml:4146

This overload passes every non-null timeout to WaitForExitOrKillOnTimeout, which throws ArgumentOutOfRangeException outside the supported range. The new exception documentation should expose that validation to callers.

This issue also appears on line 4204 of the same file.

Low severity Document invalid timeout exception

xml/​System.Diagnostics/​Process.xml:4260

This method passes the timeout through ReadAllText and WaitForExitOrKillOnTimeout; both reject values outside the supported range with ArgumentOutOfRangeException. That guaranteed exception is missing from the new documentation.

This issue also appears on line 4321 of the same file.

🧠 Review effort: Balanced

Address review 5469153656 across all seven synchronous timeout overloads. Document ArgumentOutOfRangeException when the timeout, truncated to whole milliseconds as in ProcessUtils.ToTimeoutMilliseconds, is outside the inclusive range -1 through Int32.MaxValue.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 35e2360c-54a8-4989-85bd-72b67d15b5b1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Several .NET 11 APIs remain undocumented despite the stated complete-backport scope.

0 open findings

Previously missed (2)

In code that hasn't changed since last review

Low severity Document remaining .NET 11 Process APIs

xml/​System.Diagnostics/​Process.xml:4555

The claim that all new .NET 11 Process APIs are documented is incomplete: this file still leaves Signal, TryGetProcessById, TryWaitForExitStatus, WaitForExitStatus, and WaitForExitStatusAsync with To be added. documentation. Please include those runtime docs as well so the new API surface no longer publishes placeholders.

Low severity Document .NET 11 ProcessStartInfo.StartSuspended API

xml/​System.Diagnostics/​ProcessStartInfo.xml:1540

The stated scope says all new .NET 11 ProcessStartInfo APIs are documented, but the immediately following .NET 11-only StartSuspended property still has To be added. for its summary, value, and remarks (lines 1574–1576). Please backport that property's runtime documentation as part of this completeness claim.

🧠 Review effort: Balanced

Address review 5471702627 by documenting Signal, TryGetProcessById, TryWaitForExitStatus, WaitForExitStatus, WaitForExitStatusAsync, and StartSuspended from runtime source and inherited SafeProcessHandle docs. Include Process-specific state checks, platform restrictions, timeout validation, cancellation behavior, and suspended-start semantics. Remove leftover placeholder remarks from the documented API surface.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 35e2360c-54a8-4989-85bd-72b67d15b5b1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation is complete, structurally valid, and consistent with the corresponding runtime APIs.

0 open findings

🧠 Review effort: Balanced

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @gewarren the PR is ready for review.

@adamsitnik
adamsitnik requested a review from gewarren October 13, 2026 13:01
@gewarren
gewarren merged commit cfbdb94 into main Oct 15, 2026
8 checks passed
@gewarren
gewarren deleted the copilot/backport-xml-docs-process-api branch October 15, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants