[Mono-bugs] [Bug 82796][Nor] Changed - Process.ExitCode returns 0 for forked apps
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Sep 14 15:32:13 EDT 2007
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 gert.driesen at pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=82796
--- shadow/82796 2007-09-12 10:16:09.000000000 -0400
+++ shadow/82796.tmp.10550 2007-09-14 15:32:13.000000000 -0400
@@ -10,13 +10,13 @@
Component: CORLIB
AssignedTo: mono-bugs at ximian.com
ReportedBy: skolima at gmail.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
-Summary: System.Diagnostics.Process.ExitCode always returns 0 for NAnt
+Summary: Process.ExitCode returns 0 for forked apps
Description of Problem:
I am running CruiseControl.Net on a linux box. The problem is that al
builds are reported as successful. I have pinned the problem down to
Process.ExitCode always returning ExitCode 0 for NAnt execution. The
process returns correct values for other programs (e.g. `true`, `false`).
@@ -101,6 +101,14 @@
Exit status of 'true' was 0, expected 0
Exit status of 'mono Program.exe 1' was 0, expected 1
Exit status of 'mono ./Program.exe 234' was 0, expected 234
Exit status of '/opt/mono/bin/mono Program.exe 1' was 0, expected 1
Exit status of '/opt/mono/bin/mono ./Program.exe 234' was 0, expected 234
+
+------- Additional Comments From gert.driesen at pandora.be 2007-09-14 15:32 -------
+This appears to be a runtime issue. When "forking" a managed
+application and using HasExited to check whether the process has
+exited, the exit code is always 0.
+
+As a temporary workaround adding a WaitForExit call causes the
+correct exit code to be returned.
More information about the mono-bugs
mailing list