[Mono-list] redirecting streams

Steve Lessard s_lessard at yahoo.com
Tue Nov 23 21:09:18 EST 2010


I've been experimenting with the System.Diagnostics.Process and ProcessStartInfo 
classes and their ability to redirect standard in, standard out and standard 
error. Everything works fine.  What I would like to know is how do I redirect 
additional streams?  

What additional streams are there?  Well, glad you asked. I was running a 
slightly modified version of the sample 
at http://msdn.microsoft.com/en-us/library/system.diagnostics.process.beginoutputreadline(v=VS.90).aspx.
 I changed the code to redirect standard error in addition to standard out and 
standard in. I also changed the code to run /bin/bash instead of sort.exe. With 
these modifications the program is able to capture the standard out and standard 
error from the bash process, but it doesn't capture the prompt that is output by 
bash. In other words it is not capturing "applejacks:Debug slessard$". How can I 
capture the stream that displays the bash prompt?



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20101123/e7e7cbac/attachment.html 


More information about the Mono-list mailing list