Skip to content

Mention at Process.WaitForExit's parameterless overload that async standard error stream handler is also awaited #9962

Open
@ozsvart-karoly-nx

Description

@ozsvart-karoly-nx

Hi!

I am reading the following page:
https://learn.microsoft.com/en-us/dotnet/api/System.Diagnostics.Process.WaitForExit?view=net-8.0

And I noticed the following:

This overload ensures that all processing has been completed, including the handling of asynchronous events for redirected standard output.

I think this is also true for the standard error stream, so it should be in the documentation as well.

If I'm correct, this is the source code for that:
https://github.com/dotnet/runtime/blob/v8.0.0/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs#L179

And it handles the error stream the same way as the output stream.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions