mail-archives/mono-bugs/2005-June/030011.html

119 строки
5.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 75147][Wis] Changed - System.Diagnostics.Process
class leaves zombie processes
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075147%5D%5BWis%5D%20Changed%20-%20System.Diagnostics.Process%0A%09class%20leaves%20zombie%20processes&In-Reply-To=bug-75147%40chernobyl.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="030010.html">
<LINK REL="Next" HREF="030012.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 75147][Wis] Changed - System.Diagnostics.Process
class leaves zombie processes</H1>
<B>bugzilla-daemon at bugzilla.ximian.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075147%5D%5BWis%5D%20Changed%20-%20System.Diagnostics.Process%0A%09class%20leaves%20zombie%20processes&In-Reply-To=bug-75147%40chernobyl.ximian.com"
TITLE="[Mono-bugs] [Bug 75147][Wis] Changed - System.Diagnostics.Process
class leaves zombie processes">bugzilla-daemon at bugzilla.ximian.com
</A><BR>
<I>Fri Jun 3 17:52:58 EDT 2005</I>
<P><UL>
<LI>Previous message: <A HREF="030010.html">[Mono-bugs] [Bug 75147][Wis] New - System.Diagnostics.Process class
leaves zombie processes
</A></li>
<LI>Next message: <A HREF="030012.html">[Mono-bugs] [Bug 75147][Wis] Changed - System.Diagnostics.Process
class leaves zombie processes
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#30011">[ date ]</a>
<a href="thread.html#30011">[ thread ]</a>
<a href="subject.html#30011">[ subject ]</a>
<a href="author.html#30011">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">jlarimer at gmail.com.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=75147">http://bugzilla.ximian.com/show_bug.cgi?id=75147</A>
--- 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: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">jlarimer at gmail.com</A>
QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
TargetMilestone: ---
@@ -76,6 +76,30 @@
&gt; 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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">jlarimer at gmail.com</A> 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;
+ }
+
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="030010.html">[Mono-bugs] [Bug 75147][Wis] New - System.Diagnostics.Process class
leaves zombie processes
</A></li>
<LI>Next message: <A HREF="030012.html">[Mono-bugs] [Bug 75147][Wis] Changed - System.Diagnostics.Process
class leaves zombie processes
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#30011">[ date ]</a>
<a href="thread.html#30011">[ thread ]</a>
<a href="subject.html#30011">[ subject ]</a>
<a href="author.html#30011">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>