Skip to content

Commit

Permalink
SafeProcessHandle.Unix: fix missing DangerousRelease (#37412) (#37446)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
danmoseley and tmds committed Jun 5, 2020
1 parent 74c06a9 commit 4ba9eca
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -28,7 +28,7 @@ public sealed partial class SafeProcessHandle : SafeHandleZeroOrMinusOneIsInvali
private readonly bool _releaseRef;

internal SafeProcessHandle(int processId, SafeWaitHandle handle) :
this(handle.DangerousGetHandle(), ownsHandle: false)
this(handle.DangerousGetHandle(), ownsHandle: true)
{
ProcessId = processId;
_handle = handle;
Expand Down

0 comments on commit 4ba9eca

Please sign in to comment.