[Mono-dev] sub-process invocation on posix

2013-06-06 Thread Ian Norton
Hiya, I'm aware that I can use Process.Start() but I'd really really like to be able to directly pass a list of strings to my child process as arguments rather than having to escape shell characters and spaces etc. Ie, In perl or C I'd do: system("df","-m","/home/foo/Documents/Pictures/My Holiday

Re: [Mono-dev] sub-process invocation on posix

2013-06-06 Thread Greg Young
@"My Holiday" On Thursday, June 6, 2013, Ian Norton wrote: > Hiya, I'm aware that I can use Process.Start() but I'd really really like > to be able to directly pass a list of strings to my child process as > arguments rather than having to escape shell characters and spaces etc. > > Ie, In perl o

Re: [Mono-dev] sub-process invocation on posix

2013-06-06 Thread Greg Young
Nm read wrong. On Thursday, June 6, 2013, Greg Young wrote: > @"My Holiday" > > On Thursday, June 6, 2013, Ian Norton wrote: > >> Hiya, I'm aware that I can use Process.Start() but I'd really really like >> to be able to directly pass a list of strings to my child process as >> arguments rather t

Re: [Mono-dev] sub-process invocation on posix

2013-06-10 Thread Michael Hutchinson
FWIW, you actually just need to double quote each argument and escape double quotes so you can very easily write a helper to do this in a way that works on both Mono and .NET: static Process StartProcess (string name, params string[] args) { string a = null; if (args != null && args.Length

Re: [Mono-dev] sub-process invocation on posix

2013-06-10 Thread Ian Norton
I kind of already have a thing to do that, feels a bit icky though, especially as there must be some thing lower down that undoes the joined up string into a char** again. :) On 10 June 2013 16:06, Michael Hutchinson wrote: > FWIW, you actually just need to double quote each argument and escape

Re: [Mono-dev] sub-process invocation on posix

2013-06-10 Thread Greg Najda
The Windows CreateProcessfunction takes command line arguments as a single string. This detail leaked into the .NET Process class. Windows programs with a WinMain

Re: [Mono-dev] sub-process invocation on posix

2013-06-11 Thread Ian Norton
Excellent Thanks! On 11 June 2013 01:59, Greg Najda wrote: > The Windows > CreateProcessfunction > takes command line arguments as a single string. This detail > leaked into the .NET Process class. Windows pro