<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Command Input/Output and blocking</title>
	<atom:link href="http://ivanmiljenovic.wordpress.com/2009/12/10/command-inputoutput-and-blocking/feed/" rel="self" type="application/rss+xml" />
	<link>http://ivanmiljenovic.wordpress.com/2009/12/10/command-inputoutput-and-blocking/</link>
	<description>Getting into blogging before it&#039;s too late</description>
	<lastBuildDate>Sun, 16 Jun 2013 06:28:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Ivan Miljenovic</title>
		<link>http://ivanmiljenovic.wordpress.com/2009/12/10/command-inputoutput-and-blocking/#comment-139</link>
		<dc:creator><![CDATA[Ivan Miljenovic]]></dc:creator>
		<pubDate>Thu, 10 Dec 2009 23:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://ivanmiljenovic.wordpress.com/?p=84#comment-139</guid>
		<description><![CDATA[Hmmm.... maybe...

From memory, the reason I need to have strict stdout is to ensure dot fully finishes, so I didn&#039;t think of it as being a problem with the stdin and stdout &quot;clashing&quot; in a sense.]]></description>
		<content:encoded><![CDATA[<p>Hmmm&#8230;. maybe&#8230;</p>
<p>From memory, the reason I need to have strict stdout is to ensure dot fully finishes, so I didn&#8217;t think of it as being a problem with the stdin and stdout &#8220;clashing&#8221; in a sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ToRA</title>
		<link>http://ivanmiljenovic.wordpress.com/2009/12/10/command-inputoutput-and-blocking/#comment-138</link>
		<dc:creator><![CDATA[ToRA]]></dc:creator>
		<pubDate>Thu, 10 Dec 2009 14:50:16 +0000</pubDate>
		<guid isPermaLink="false">http://ivanmiljenovic.wordpress.com/?p=84#comment-138</guid>
		<description><![CDATA[No, dot output stuffs after the first digraph/graph {} is closed, (it may well be using line buffering so it looks like you need to eof when you actually need to newline).  Either way, you block on stdout being closed (strict hGetContents), which it doesn&#039;t close until stdin closes (and there is no more work to do).
try:

$ cat &#124; dot
digraph {
} 
digraph {
} 

dot will output something back, after the first , but leave stdin open for you to enter more stuff...

T]]></description>
		<content:encoded><![CDATA[<p>No, dot output stuffs after the first digraph/graph {} is closed, (it may well be using line buffering so it looks like you need to eof when you actually need to newline).  Either way, you block on stdout being closed (strict hGetContents), which it doesn&#8217;t close until stdin closes (and there is no more work to do).<br />
try:</p>
<p>$ cat | dot<br />
digraph {<br />
}<br />
digraph {<br />
} </p>
<p>dot will output something back, after the first , but leave stdin open for you to enter more stuff&#8230;</p>
<p>T</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Miljenovic</title>
		<link>http://ivanmiljenovic.wordpress.com/2009/12/10/command-inputoutput-and-blocking/#comment-137</link>
		<dc:creator><![CDATA[Ivan Miljenovic]]></dc:creator>
		<pubDate>Thu, 10 Dec 2009 14:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://ivanmiljenovic.wordpress.com/?p=84#comment-137</guid>
		<description><![CDATA[Close: dot won&#039;t start doing anything until the stdin handle closes; as such, it just hangs waiting for an EOF that never comes :s

(What makes it even more fun is that I had to keep closing ghci to kill off the zombie processes that it spawned...)]]></description>
		<content:encoded><![CDATA[<p>Close: dot won&#8217;t start doing anything until the stdin handle closes; as such, it just hangs waiting for an EOF that never comes :s</p>
<p>(What makes it even more fun is that I had to keep closing ghci to kill off the zombie processes that it spawned&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ToRA</title>
		<link>http://ivanmiljenovic.wordpress.com/2009/12/10/command-inputoutput-and-blocking/#comment-136</link>
		<dc:creator><![CDATA[ToRA]]></dc:creator>
		<pubDate>Thu, 10 Dec 2009 14:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://ivanmiljenovic.wordpress.com/?p=84#comment-136</guid>
		<description><![CDATA[On a guess, you use the bracket to close stdin, and dot won&#039;t close stdout or stderr until stdin closes (you can give dot multiple graphs one after another).  Stdin/stdout not closing means your signal mvars never get written, and thus you end up blocking...?]]></description>
		<content:encoded><![CDATA[<p>On a guess, you use the bracket to close stdin, and dot won&#8217;t close stdout or stderr until stdin closes (you can give dot multiple graphs one after another).  Stdin/stdout not closing means your signal mvars never get written, and thus you end up blocking&#8230;?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
