<?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/"
		>
<channel>
	<title>Comments on: Fork/exec in Haskell</title>
	<atom:link href="http://therning.org/magnus/archives/727/feed" rel="self" type="application/rss+xml" />
	<link>http://therning.org/magnus/archives/727</link>
	<description>Incoherent mumblings</description>
	<lastBuildDate>Wed, 08 Aug 2012 00:21:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Emmelaich</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-188716</link>
		<dc:creator>Emmelaich</dc:creator>
		<pubDate>Tue, 15 Sep 2009 03:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-188716</guid>
		<description><![CDATA[&lt;p&gt;Set &#039;close on exec&#039; on the descriptors.
http://en.wikipedia.org/wiki/Fork-exec&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Set &#8216;close on exec&#8217; on the descriptors.
<a href="http://en.wikipedia.org/wiki/Fork-exec" rel="nofollow">http://en.wikipedia.org/wiki/Fork-exec</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magnus</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-186918</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Sat, 22 Aug 2009 07:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-186918</guid>
		<description><![CDATA[&lt;p&gt;&lt;strong&gt;@bbb&lt;/strong&gt;, It seems rather silly to iterate over all &lt;em&gt;valid&lt;/em&gt; file descriptors, it&#039;d be much nicer to only iterate over all &lt;em&gt;open&lt;/em&gt; file descriptors.  I&#039;ll have to take a look at the bash code though, for educational purposes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;@ifp5&lt;/strong&gt;, Yes, that sounds like a good way to go.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p><strong>@bbb</strong>, It seems rather silly to iterate over all <em>valid</em> file descriptors, it&#8217;d be much nicer to only iterate over all <em>open</em> file descriptors.  I&#8217;ll have to take a look at the bash code though, for educational purposes.</p>

<p><strong>@ifp5</strong>, Yes, that sounds like a good way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ifp5</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-186894</link>
		<dc:creator>ifp5</dc:creator>
		<pubDate>Sat, 22 Aug 2009 00:54:40 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-186894</guid>
		<description><![CDATA[&lt;p&gt;I&#039;d better use /dev/fd/* instead of /proc/self/*, it&#039;s much more portable.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I&#8217;d better use /dev/fd/* instead of /proc/self/*, it&#8217;s much more portable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magnus</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-186886</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Fri, 21 Aug 2009 22:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-186886</guid>
		<description><![CDATA[&lt;p&gt;&lt;strong&gt;@Twan&lt;/strong&gt;, For this example there isn&#039;t much reason, but in many cases it is nice to separate fork and exec.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;@ephemient&lt;/strong&gt;, Yes, it was &lt;code&gt;getdtablesize()&lt;/code&gt; I was looking for, but couldn&#039;t find.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;@Blame&lt;/strong&gt;, Huh?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p><strong>@Twan</strong>, For this example there isn&#8217;t much reason, but in many cases it is nice to separate fork and exec.</p>

<p><strong>@ephemient</strong>, Yes, it was <code>getdtablesize()</code> I was looking for, but couldn&#8217;t find.</p>

<p><strong>@Blame</strong>, Huh?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blame</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-186883</link>
		<dc:creator>Blame</dc:creator>
		<pubDate>Fri, 21 Aug 2009 20:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-186883</guid>
		<description><![CDATA[&lt;p&gt;&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html#v:finally&quot; rel=&quot;nofollow&quot;&gt;finally&lt;/a&gt;&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p><a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html#v:finally" rel="nofollow">finally</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ephemient</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-186879</link>
		<dc:creator>ephemient</dc:creator>
		<pubDate>Fri, 21 Aug 2009 18:23:10 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-186879</guid>
		<description><![CDATA[&lt;p&gt;a. Just try to close all FDs up to getdtablesize() or sysconf(_SC_OPEN_MAX).  Slow but mostly portable.&lt;/p&gt;

&lt;p&gt;b. Look at /proc/self/fd/.  Faster but not as portable.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>a. Just try to close all FDs up to getdtablesize() or sysconf(_SC_OPEN_MAX).  Slow but mostly portable.</p>

<p>b. Look at /proc/self/fd/.  Faster but not as portable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twan van Laarhoven</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-186877</link>
		<dc:creator>Twan van Laarhoven</dc:creator>
		<pubDate>Fri, 21 Aug 2009 16:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-186877</guid>
		<description><![CDATA[&lt;p&gt;Why are you using fork/exec as opposed to System.Process?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Why are you using fork/exec as opposed to System.Process?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bbb</title>
		<link>http://therning.org/magnus/archives/727/comment-page-1#comment-186876</link>
		<dc:creator>bbb</dc:creator>
		<pubDate>Fri, 21 Aug 2009 16:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=727#comment-186876</guid>
		<description><![CDATA[&lt;p&gt;The classic Unix way to do this is to find out the maximum valid file descriptor and then close all of them in a for loop  (e.g., see bash). Looking over &lt;code&gt;System.Posix.IO&lt;/code&gt;, it seems that it is lacking a function of the sort&lt;/p&gt;

&lt;p&gt;&lt;code&gt;unsafeMakeFd :: Int -&gt; Fd&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to replicate that strategy.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>The classic Unix way to do this is to find out the maximum valid file descriptor and then close all of them in a for loop  (e.g., see bash). Looking over <code>System.Posix.IO</code>, it seems that it is lacking a function of the sort</p>

<p><code>unsafeMakeFd :: Int -&gt; Fd</code></p>

<p>to replicate that strategy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
