[Mono-bugs] [Bug 76402][Nor] New - A process gives the wrong information for HasExited after running for a bit.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Oct 10 19:28:41 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 carlos at applianz.com.

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

--- shadow/76402	2005-10-10 19:28:41.000000000 -0400
+++ shadow/76402.tmp.16789	2005-10-10 19:28:41.000000000 -0400
@@ -0,0 +1,85 @@
+Bug#: 76402
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Gentoo 64bit
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: carlos at applianz.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: A process gives the wrong information for HasExited after running for a bit.
+
+I have some simple code to reproduce the problem, which I believe started
+on 1.1.9.1 (I never tried 1.1.9 but I did try 1.1.8 and it didn't happen then).
+Basically I run the code and it works fine but I leave it running for a bit
+and even though the program it started its still open the Process.HasExited
+starts returning True. I am pasting code and the output of the code.
+
+
+=================================================================
+using System;
+using System.Text;
+
+namespace ConsoleApplication
+{
+	class Program
+	{
+		static void Main(string[] args)
+		{
+			System.Diagnostics.ProcessStartInfo info = new
+System.Diagnostics.ProcessStartInfo("xcalc");
+			System.Diagnostics.Process p = System.Diagnostics.Process.Start(info);
+			while(true){
+				Console.WriteLine(p.Id + ": "+ p.HasExited);
+				if (p.HasExited){
+				
+Console.WriteLine(System.Diagnostics.Process.GetProcessById(p.Id).HasExited);
+					
+				}
+				System.Threading.Thread.Sleep(1000);
+			}
+			
+			
+		}
+	}
+}
+
+==========================================================
+
+OUTPUT:
+
+8922: False
+8922: False
+8922: False
+8922: False
+8922: False
+8922: False
+8922: False
+8922: False
+8922: False
+8922: False
+8922: True
+True
+8922: True
+True
+8922: True
+True
+8922: True
+True
+8922: True
+True
+8922: True
+True
+8922: True
+True
+8922: True
+True
+8922: True
+True


More information about the mono-bugs mailing list