[Mono-bugs] [Bug 55449][Nor] New - Process.ExitCode not set when segmentation fault occurs

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 10 Mar 2004 21:23:36 -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 krisolav@hotmail.com.

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

--- shadow/55449	2004-03-10 21:23:36.000000000 -0500
+++ shadow/55449.tmp.27520	2004-03-10 21:23:36.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 55449
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: krisolav@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Process.ExitCode not set when segmentation fault occurs
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+If Process kicks off a process that crashes with a segmentation fault,
+there is no way to know.
+
+Steps to reproduce the problem:
+1.  Use a program that seg faults.  Ex:
+      int main()
+      {
+        char * str = 0;
+        if (*str == '\n')
+                return 1;
+        return 0;
+      }
+
+2. Kick off w/ Process.Start():
+      string exe = "above program exe";
+      ProcessStartInfo startInfo = new ProcessStartInfo(exe, "");
+      startInfo.WorkingDirectory = indexDir;
+      startInfo.UseShellExecute = false;
+      Process proc = Process.Start(startInfo);
+      proc.WaitForExit();
+      if (proc.ExitCode != 0)
+           throw new Exception("Error: " + proc.ExitCode);
+
+3. 
+
+Actual Results:
+ExitCode is 0, no exception is thrown
+
+Expected Results:
+ExitCode is not 0 and an exception is thrown.  The shell returns a status
+of 139 when the seg fault happened.
+
+How often does this happen? 
+Every time.
+
+Additional Information: