Handle recycled child PIDs (dotnet/corefx#27763)
authorTom Deseyn <tom.deseyn@gmail.com>
Thu, 5 Apr 2018 04:09:40 +0000 (06:09 +0200)
committerStephen Toub <stoub@microsoft.com>
Thu, 5 Apr 2018 04:09:40 +0000 (21:09 -0700)
commit7daa6c30082da9b2b8f4cbbd4ae0e2a8e4bffc8a
tree7ec81a3846372557ceca07c625baf8a164ab1d7f
parentd468d433387a685c4eba5e377f45051e8cfc96fe
Handle recycled child PIDs (dotnet/corefx#27763)

* ProcessWaitState: support recycled child pids

* Ensure ProcessWaitHandle uses same ProcessWaitState as Process

* Fix race between Close and CompletionCallback

* Revert GetWaitState

* Add test

* Handle race between Close and CompletionCallback

Commit migrated from https://github.com/dotnet/corefx/commit/8b66ba0fe5555e4c69d502cf69b6640f81da6001
src/libraries/System.Diagnostics.Process/src/FxCopBaseline.cs
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessWaitHandle.Unix.cs
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessWaitState.Unix.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs