Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2009-01-18 19:00:11 +0300
committerZoltan Varga <vargaz@gmail.com>2009-01-18 19:00:11 +0300
commit10cabfadcc1d034571d60581321632e96d717985 (patch)
tree37d065fe30015f12e61d1e060110c43da7d0cac1 /mcs/class/System/System.Diagnostics/Process.cs
parentc3406ea9664b74ef6e541a6aead45b83a24c7a53 (diff)
2009-01-18 Zoltan Varga <vargaz@gmail.com>
* Process.cs: Avoid closing the duplicated process handle in ProcessWaitHandle, it is done automatically by the WaitHandle.Dispose (). Fixes #464628. svn path=/trunk/mcs/; revision=123738
Diffstat (limited to 'mcs/class/System/System.Diagnostics/Process.cs')
-rw-r--r--mcs/class/System/System.Diagnostics/Process.cs22
1 files changed, 2 insertions, 20 deletions
diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs
index d2d510c1c08..a26719e84a5 100644
--- a/mcs/class/System/System.Diagnostics/Process.cs
+++ b/mcs/class/System/System.Diagnostics/Process.cs
@@ -1665,27 +1665,9 @@ namespace System.Diagnostics {
// Need to keep a reference to this handle,
// in case the Process object is collected
Handle = ProcessHandle_duplicate (handle);
- }
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern static void ProcessHandle_close (IntPtr handle);
-
- private bool disposed = false;
-
- protected override void Dispose (bool explicitDisposing)
- {
- if (this.disposed == false) {
- this.disposed = true;
-
- ProcessHandle_close (Handle);
- Handle = IntPtr.Zero;
- }
- base.Dispose (explicitDisposing);
- }
- ~ProcessWaitHandle ()
- {
- Dispose (false);
+ // When the wait handle is disposed, the duplicated handle will be
+ // closed, so no need to override dispose (bug #464628).
}
}
}