dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
739 stars 1.57k forks source link

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

Open ozsvart-karoly-nx opened 6 months ago

ozsvart-karoly-nx commented 6 months ago

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.

dotnet-issue-labeler[bot] commented 6 months ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

dotnet-policy-service[bot] commented 6 months ago

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process