[Mono-list] Starting processes with parameters from Mono 0.31 and mono-0.31.99.20040331

Lluis Sanchez lluis@ximian.com
Thu, 01 Apr 2004 16:12:09 +0200


Try what Gonzalo said, but also change the Start call to:

Process.Start (psi);

since that Start method overload is static, so you are not allowed to
call it with an instance reference. MCS should complain about that, but
it doesn't because of a bug.

Lluis.

> 

On dj, 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  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list