[Mono-bugs] [Bug 77736][Nor] New - WaitForExit(int) will
sporadically return false immediately, before the timeout
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Mar 8 17:15:18 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 faceprint at faceprint.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77736
--- shadow/77736 2006-03-08 17:15:18.000000000 -0500
+++ shadow/77736.tmp.20612 2006-03-08 17:15:18.000000000 -0500
@@ -0,0 +1,69 @@
+Bug#: 77736
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Ubuntu 5.10 running 1.1.13.2
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: faceprint at faceprint.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: WaitForExit(int) will sporadically return false immediately, before the timeout
+
+Description of Problem:
+
+Process.WaitForExit(int) will sometimes return false immediately, rather
+than waiting for the timeout. An immediate call to Process.HasExited
+reveals that the process (at least by then) has exited.
+
+
+Steps to reproduce the problem:
+1. Compile and run the following code:
+
+using System;
+using System.Diagnostics;
+
+namespace Foo
+{
+ class Foo
+ {
+ public static void Main()
+ {
+ for(int i=0; i<10000; i++)
+ {
+ Process p = new Process();
+ p.StartInfo.FileName = "true";
+
+ p.Start();
+
+ bool ret = p.WaitForExit(60000);
+
+ if(!ret && p.HasExited) {
+ Console.Error.WriteLine("{0} bug", i);
+ }
+ }
+ }
+ }
+}
+
+Actual Results:
+Sporadic output, as WaitForExit returns false immediately, and HasExited is
+true
+
+Expected Results:
+No output, as "true" will most certainly have exited before the 1 minute
+timeout.
+
+
+How often does this happen?
+Seemingly at random
+
+Additional Information:
+First discovered in CruiseControl.Net 1.1, where the task to call
+subversion to check for updates would "time out"
More information about the mono-bugs
mailing list