diff options
author | Dan Moseley <danmose@microsoft.com> | 2020-06-05 21:06:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 21:06:25 +0300 |
commit | 4ba9ecaabd4d5c87c776a030eafdac0bae0512cf (patch) | |
tree | a4e562ca30f270eb83b543a97e86c447fe0fc6cf | |
parent | 74c06a9f83f078ab045ff046f4f72e2a7601f0a2 (diff) |
SafeProcessHandle.Unix: fix missing DangerousRelease (#37412) (#37446)v5.0.0-preview.6.20305.6
Because the SafeProcessHandle was not owned, ReleaseHandle was
not called, causing the wrapped SafeWaitHandle to never release
its resources.
Co-authored-by: Tom Deseyn <tom.deseyn@gmail.com>
-rw-r--r-- | src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs b/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs index 798e8f23d30..3eec27d8826 100644 --- a/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs @@ -28,7 +28,7 @@ namespace Microsoft.Win32.SafeHandles private readonly bool _releaseRef; internal SafeProcessHandle(int processId, SafeWaitHandle handle) : - this(handle.DangerousGetHandle(), ownsHandle: false) + this(handle.DangerousGetHandle(), ownsHandle: true) { ProcessId = processId; _handle = handle; |