[Mono-list] Starting processes with parameters from Mono 0.31
and mono-0.31.99.20040331
Gonzalo Paniagua Javier
gonzalo@ximian.com
Mon, 05 Apr 2004 10:12:18 +0200
El dom, 04-04-2004 a las 19:06, Ivan Gu¾vinec 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