[Mono-devel-list] Capturing Shell Output: System.Diagnostics.Process
Jörg Rosenkranz
joergr at voelcker.com
Thu Feb 3 08:04:27 EST 2005
Hello Sander,
> -----Original Message-----
> From: Sander Rijken [mailto:sr at d-90.nl]
> Sent: Wednesday, February 02, 2005 11:41 PM
>
> That will probably not work I'm affraid. You'll need two
> monitor threads,
> one looking at StandardOutput and one looking at
> StandardError, to avoid
> blocking and possible deadlock.
> (see
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/cpref/html/frlrfSystemDiagnosticsProcessPropertiesTopic.asp)
>
> Here's an example how it's done in monodevelop:
> http://svn.myrealbox.com/monodevelop/trunk/MonoDevelop/Core/sr
c/MonoDevelop.Base/Services/ProcessService/ProcessWrapper.cs
I never had any problems with this on .NET and Mono. Maybe
this can a problem with large outputs on standard out?
I think MonoDevelop uses threads to monitor the streams to
get continous output to the user.
Joerg.
More information about the Mono-devel-list
mailing list