[Mono-bugs] [Bug 52748][Nor] New - System.Diagnostics.Process.ExitCode Property Failure
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 11 Jan 2004 09:16:02 -0500 (EST)
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 ecmel@ercansoy.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52748
--- shadow/52748 2004-01-11 09:16:02.000000000 -0500
+++ shadow/52748.tmp.16858 2004-01-11 09:16:02.000000000 -0500
@@ -0,0 +1,58 @@
+Bug#: 52748
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details: Fedora Core 1
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ecmel@ercansoy.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Diagnostics.Process.ExitCode Property Failure
+
+Hello,
+
+With Mono 0.29 running on Linux (Fedora Core 1, using Dag Wieers' Mono
+RPMs), System.Diagnostics.Process.ExitCode Property always returns 259 no
+matter what the child process actually returns.
+
+With the previous version of Mono, it was working as expected.
+
+Sample:
+
+using System;
+using System.Diagnostics;
+
+namespace ExitCode
+{
+
+ public class ExitCode
+ {
+ public static int Main (string[] args)
+ {
+ Process process = new Process ();
+
+ process.StartInfo.FileName = "xterm";
+ process.StartInfo.RedirectStandardError = true;
+ process.StartInfo.UseShellExecute = false;
+ process.Start ();
+
+ string input = null;
+ while(( input = process.StandardError.ReadLine()) != null)
+ Console.WriteLine (input);
+
+ // The following always returns "259" (with any process tried)
+ Console.WriteLine ("Process exit code:" + process.ExitCode);
+
+
+ return 0;
+ }
+ }
+
+}