[Mono-list] ProcessStartInfo and arguments with a backslash
Uli Hertlein
uli at xdt.com.au
Tue Oct 4 07:43:40 EDT 2011
On 10/04/2011 01:40 PM, Uli Hertlein wrote:
> On 10/01/2011 08:17 PM, Yves Goergen wrote:
>> I am debugging a problem with my .NET application calling a UNIX
>> programme with arguments. The bash command line looks like this:
>>
>> /usr/bin/smem -P '/usr/sbin/exim4(\s|$)'
>>
>> My C# code to do exactly that is the following:
>>
>> string processPath = "/usr/sbin/exim4(\s|$)";
>> ProcessStartInfo psi = new ProcessStartInfo(
>> "smem",
>> "-P '" + processPath + "'");
>> psi.RedirectStandardOutput = true;
>> psi.UseShellExecute = false;
D'oh! Sorry, I missed this part.
/uli
--
Ulrich Hertlein
Research and Development mailto:uli at xdt.com.au
XDT Pty Ltd http://www.xdt.com.au
More information about the Mono-list
mailing list