[Mono-bugs] [Bug 75147][Wis] Changed - System.Diagnostics.Process
class leaves zombie processes
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Jun 3 17:52:58 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by jlarimer at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75147
--- shadow/75147 2005-06-03 17:36:10.000000000 -0400
+++ shadow/75147.tmp.28948 2005-06-03 17:52:58.000000000 -0400
@@ -2,13 +2,13 @@
Product: Mono: Class Libraries
Version: 1.1
OS: GNU/Linux [Other]
OS Details: Fedora Core 2
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: System
AssignedTo: mono-bugs at ximian.com
ReportedBy: jlarimer at gmail.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
@@ -76,6 +76,30 @@
> Additional Information:
I noticed this happening when redirecting standard output and calling
ReadToEnd() on the stream. I fixed the problem in my code by using a
WaitForExit() call.
+
+------- Additional Comments From jlarimer at gmail.com 2005-06-03 17:52 -------
+This can be fixed by calling ExitCode_internal() while disposing of
+the Process object. A better fix can probably be made at a lower
+level, but it appears the problem stems from not getting the exit code
+of the process.
+
+Index: class/System/System.Diagnostics/Process.cs
+===================================================================
+--- class/System/System.Diagnostics/Process.cs (revision 45386)
++++ class/System/System.Diagnostics/Process.cs (working copy)
+@@ -935,7 +935,7 @@
+
+ lock(this) {
+ if(process_handle!=IntPtr.Zero) {
+-
++
+ExitCode_internal(process_handle);
+
+Process_free_internal(process_handle);
+
+process_handle=IntPtr.Zero;
+ }
+
More information about the mono-bugs
mailing list