Re: [Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331
El dom, 04-04-2004 a las 19:06, Ivan Guvinec escribi: Hi, I stumbled upon then same problem in my project after upgrading to Mono 0.31. The workaround with UseShellExecute = false works, but I have noticed a considerable performance penalty. So I wonder: 1. Is the fact that arguments are not used without UseShellExecute a bug in Mono 0.31 release? Yes. 2. Is using UseShellExecute = false slower in comparison to UseShellExecute = true? No, it should be faster. Currently, if you set UseShellExecute to true, the command run is: $SHELL -c 'yourprogram yourparameters' MS seems to run 'cmd /c yourprogram yourparameters'. The diference is that cmd on windows also handles something like 'cmd /c file.pdf' by opening acrobat reader and stuff like that. My idea is to distribute a shell script with mono that first tries gnome-open or kfmclient and then defaults to $SHELL -c ... so that we achieve similar functionality as MS. When UseShellExecute is false, it's like running system (yourprogram yourparameters); -Gonzalo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331
Hi, I stumbled upon then same problem in my project after upgrading to Mono 0.31. The workaround with UseShellExecute = false works, but I have noticed a considerable performance penalty. So I wonder: 1. Is the fact that arguments are not used without UseShellExecute a bug in Mono 0.31 release? 2. Is using UseShellExecute = false slower in comparison to UseShellExecute = true? Thanks, Ivan On Thu, 2004-04-01 at 15:36, Vadim B. Guzev wrote: Hello! I've seen somewhere in the list before (but I can't find this letter now, when I really need it :( ) that someone had problems with starting processes with parameters from Mono 0.31. Was this problem solved? I have the same problem now, as even the following simple application doesn't work anymore in Mono 0.31 (it worked correctly in Mono 0.29): 8-- using System; using System.Diagnostics; class ProcessStart { static void Main(string[] args) { Console.Out.WriteLine(Trying to start: 'mono --version'); ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = mono; psi.Arguments = --version; Process p = new Process(); p.Start( psi ); } } 8-- Instead of printing the version - it prints now the help for parameters usage... I've checked and the specified parameters (--version) are not passed to the target program (mono) at all... Is there any workaround for this problem? I've tried the daily package mono-0.31.99.20040331.tar.gz, but it seems to me, that method Process.Start doesn't work at all in this version ... even without parameters... :( What's happening? Best regards, Vadim B. Guzev ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list signature.asc Description: This is a digitally signed message part
Re: [Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331
Are you using Windows or Linux? As I understand UseShellExecute, when set to false, Process.Start() will treat the filename as a binary image and attempt to execute it directly. This is really the only option that makes sense under vanilla Unix. On Windows, when UseShellExecute == true, it causes Windows to use the windows shell to process the filename. If the filename is a document, Windows will attempt to use an appropriate application to open the document. GNOME and KDE both provide mechanisms equivalent to the Windows Shell from what I understand, but whether to use these or not (and how to choose which one if both are present) seems unclear. Rotor under Linux simply throws an exception if UseShellExecute == true. On Sunday 04 April 2004 12:06 pm, Ivan Guvinec wrote: Hi, I stumbled upon then same problem in my project after upgrading to Mono 0.31. The workaround with UseShellExecute = false works, but I have noticed a considerable performance penalty. So I wonder: 1. Is the fact that arguments are not used without UseShellExecute a bug in Mono 0.31 release? 2. Is using UseShellExecute = false slower in comparison to UseShellExecute = true? ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331
El vie, 02-04-2004 a las 01:04, vguzev escribió: add: psi.UseShellExecute = false; and it will work. Hmmm it doesn't work with UseShellExecute=false too... :( 8- [EMAIL PROTECTED] processstart]$ cat ProcessStart.cs using System; using System.Diagnostics; class ProcessStart { static void Main(string[] args) { Console.Out.WriteLine(Trying to start: 'mono --version'); ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = mono; psi.UseShellExecute = false; psi.Arguments = --version; Process p = new Process(); p.Start( psi ); } } [EMAIL PROTECTED] processstart]$ mcs ProcessStart.cs Compilation succeeded [EMAIL PROTECTED] processstart]$ mono --version Mono JIT compiler version 0.31.99.20040331, (C) 2002-2004 Novell, Inc and Contri butors. www.go-mono.com TLS: normal GC:Included Boehm (with typed GC) SIGSEGV : normal Globalization: none [EMAIL PROTECTED] processstart]$ mono ProcessStart.exe Trying to start: 'mono --version' 8- Your program works here: [EMAIL PROTECTED]:~$ mono go-mono/p.exe Trying to start: 'mono --version' Mono JIT compiler version 0.31.99, (C) 2002-2004 Novell, Inc and Contributors. www.go-mono.com TLS: normal GC:Included Boehm (with typed GC) SIGSEGV : normal Globalization: ICU This is current CVS. -Gonzalo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331
On Thu, 2004-04-01 at 15:36, Vadim B. Guzev wrote: Hello! I've seen somewhere in the list before (but I can't find this letter now, when I really need it :( ) that someone had problems with starting processes with parameters from Mono 0.31. Was this problem solved? I have the same problem now, as even the following simple application doesn't work anymore in Mono 0.31 (it worked correctly in Mono 0.29): 8-- using System; using System.Diagnostics; class ProcessStart { static void Main(string[] args) { Console.Out.WriteLine(Trying to start: 'mono --version'); ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = mono; psi.Arguments = --version; Process p = new Process(); p.Start( psi ); } } add: psi.UseShellExecute = false; and it will work. -Gonzalo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331
add: psi.UseShellExecute = false; and it will work. Hmmm it doesn't work with UseShellExecute=false too... :( 8- [EMAIL PROTECTED] processstart]$ cat ProcessStart.cs using System; using System.Diagnostics; class ProcessStart { static void Main(string[] args) { Console.Out.WriteLine(Trying to start: 'mono --version'); ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = mono; psi.UseShellExecute = false; psi.Arguments = --version; Process p = new Process(); p.Start( psi ); } } [EMAIL PROTECTED] processstart]$ mcs ProcessStart.cs Compilation succeeded [EMAIL PROTECTED] processstart]$ mono --version Mono JIT compiler version 0.31.99.20040331, (C) 2002-2004 Novell, Inc and Contri butors. www.go-mono.com TLS: normal GC:Included Boehm (with typed GC) SIGSEGV : normal Globalization: none [EMAIL PROTECTED] processstart]$ mono ProcessStart.exe Trying to start: 'mono --version' 8- Anything else? Best regards, Vadim B. Guzev ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331
add: psi.UseShellExecute = false; and it will work. Hmmm it doesn't work with UseShellExecute=false too... :( 8- [EMAIL PROTECTED] processstart]$ cat ProcessStart.cs using System; using System.Diagnostics; class ProcessStart { static void Main(string[] args) { Console.Out.WriteLine(Trying to start: 'mono --version'); ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = mono; psi.UseShellExecute = false; psi.Arguments = --version; Process p = new Process(); p.Start( psi ); } } [EMAIL PROTECTED] processstart]$ mcs ProcessStart.cs Compilation succeeded [EMAIL PROTECTED] processstart]$ mono --version Mono JIT compiler version 0.31.99.20040331, (C) 2002-2004 Novell, Inc and Contri butors. www.go-mono.com TLS: normal GC:Included Boehm (with typed GC) SIGSEGV : normal Globalization: none [EMAIL PROTECTED] processstart]$ mono ProcessStart.exe Trying to start: 'mono --version' 8- Anything else? Best regards, Vadim B. Guzev ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list