<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>System.Diagnostics.Process: avoid deadlocks in RedirectStandardInput/Output (Lucian Wischik)</title><link>http://blogs.msdn.com/b/vbteam/archive/2008/12/30/system-diagnostics-process-avoid-deadlocks-in-redirectstandardinput-output-lucian-wischik.aspx</link><description>It's common that you want to launch an external process but supply input and capture the output. Here's one attempt: 
 ' BAD CODE 
 Using p As New System.Diagnostics.Process 
 p.StartInfo.FileName = "cat" 
 p.StartInfo.UseShellExecute = False 
 p</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: System.Diagnostics.Process: avoid deadlocks in RedirectStandardInput/Output (Lucian Wischik)</title><link>http://blogs.msdn.com/b/vbteam/archive/2008/12/30/system-diagnostics-process-avoid-deadlocks-in-redirectstandardinput-output-lucian-wischik.aspx#9290675</link><pubDate>Thu, 08 Jan 2009 01:17:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9290675</guid><dc:creator>Ted</dc:creator><description>&lt;p&gt;The code has another bug. &amp;nbsp;The sub-process executed could hang or go into an infinite loop and never terminate. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is the basic case of not blocking on a subprocess by creating a thread to load and execute it. &amp;nbsp;It has nothing really to do with standard input and standard output.&lt;/p&gt;
&lt;p&gt;P.s. Thanks for referring to the old unix cat utility. &amp;nbsp;I've used many of them, sed and tiffcp especially, for processing data from within a .net application.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9290675" width="1" height="1"&gt;</description></item><item><title>System.Diagnostics.Process: avoid deadlocks in RedirectStandardInput/Output (Lucian Wischik) | Coded Style</title><link>http://blogs.msdn.com/b/vbteam/archive/2008/12/30/system-diagnostics-process-avoid-deadlocks-in-redirectstandardinput-output-lucian-wischik.aspx#9257345</link><pubDate>Tue, 30 Dec 2008 20:19:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9257345</guid><dc:creator>System.Diagnostics.Process: avoid deadlocks in RedirectStandardInput/Output (Lucian Wischik) | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/systemdiagnosticsprocess-avoid-deadlocks-in-redirectstandardinputoutput-lucian-wischik/"&gt;http://www.codedstyle.com/systemdiagnosticsprocess-avoid-deadlocks-in-redirectstandardinputoutput-lucian-wischik/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9257345" width="1" height="1"&gt;</description></item></channel></rss>