[Mono-bugs] [Bug 56448][Maj] New - Parameters for starting new processes are ignored

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 4 Apr 2004 06:33:50 -0400 (EDT)


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 projects@saring.de.

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

--- shadow/56448	2004-04-04 06:33:50.000000000 -0400
+++ shadow/56448.tmp.26359	2004-04-04 06:33:50.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 56448
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Debian Sarge, Fedora Core1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: projects@saring.de               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Parameters for starting new processes are ignored
+
+Hi,
+
+I've got the following problem after updating mono to version 0.31. With
+version 0.30 it has been working fine.
+In my application I need to start another application and give some
+parameters to it. Since mono 0.31 the application will be started, but the
+parameters are ignored. 
+I've created a little sample application, which starts gedit and let it
+create a new file. gedit will be started, but without parameters, an
+exception will not be thrown.
+Would be great, if this could get fixed...
+
+Bye,
+Stefan
+
+The sample application:
+
+using System;
+using System.Diagnostics;
+
+public class StartProcess
+{
+    public static void Main (string[] args)
+    {
+        try {
+            Process process = new Process ();
+            ProcessStartInfo processStartInfo = new ProcessStartInfo ();
+            
+            // start "gedit" and let it create the file "new_file.txt"
+            processStartInfo.FileName = "gedit new_file.txt";
+            
+            // this also does not work (when FileName is "gedit" only)
+            // processStartInfo.Arguments = "new_file.txt";
+            
+            process.StartInfo = processStartInfo;
+            process.Start ();
+        }
+        catch (Exception)
+        {
+            // will not be thrown
+            Console.WriteLine ("ERROR: Failed to start process ...");
+        }
+    }
+}