[Mono-bugs] [Bug 77201][Wis] New - Processes started by mono stay alive as Zombies

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jan 10 16:59:08 EST 2006


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 carlos at applianz.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77201

--- shadow/77201	2006-01-10 16:59:08.000000000 -0500
+++ shadow/77201.tmp.8626	2006-01-10 16:59:08.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 77201
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Gentoo 64bit
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: carlos at applianz.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Processes started by mono stay alive as Zombies
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Start xcalc with mono.
+2. Close xcalc while the mono process is still running.
+3. look for the xcalc process on ps and you will see it still shows and now
+its <defunct>
+
+Actual Results:
+After closing xcalc but leaving the mono program that launched it open I got:
+
+>ps -ef | grep 23899
+
+applianz 23899 23895  0 14:38 pts/0    00:00:00 [xcalc] <defunct>
+
+
+Expected Results:
+
+xcalc should be allowed to close and not stay a zombie.
+
+How often does this happen? 
+
+Everytime unless on your C# code you check for the status of the process,
+at which point the process is allowed to exit.
+
+Additional Information:
+
+If you run:
+
+System.Diagnostics.ProcessStartInfo info = new
+System.Diagnostics.ProcessStartInfo("xcalc");
+			info.UseShellExecute = false;
+			System.Diagnostics.Process p = System.Diagnostics.Process.Start(info);
+Console.WriteLine(p.Id);
+Console.ReadLine();	
+
+and close xcalc then check on the process ID that was printed out without
+closing the mono process you will get a defunct process.
+
+If you add a call to:
+p.HasExited;
+
+at any point after the process has actually closed, then mono will return
+the correct value and the process will not be shown as zombie anymore.
+
+I read somewhere that a child process is a zombie until its parent checks
+the status of the child process, which is what seems like its ocurring here.


More information about the mono-bugs mailing list