<div dir="ltr">Eric, David here is a patch review:<br><br><div class="gmail_quote">On Sun, Oct 19, 2008 at 11:08 PM, Salvatore Insalaco <span dir="ltr">&lt;<a href="mailto:kirby81@gmail.com">kirby81@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m sorry for not using darcs send: unfortunately my mail are blocked<br>
by the mailing list spam filter.<br>
<br>
This patch should hopefully fix issue 784 (Windows complaining while<br>
paging the help).<br>
<br>
There where three things involved:<br>
1) There is a file handle leak in pipeDocToPager when an exception is<br>
raised. This is the direct cause of the &quot;permission denied&quot; errors, as<br>
you can&#39;t delete an opened file in Windows.</blockquote><div><br>Thanks for spotting that.&nbsp; Adding bracket looks like a good idea.&nbsp; This would be yet another place where we could use either iteratees or light weight monadic regions to make this resource leak impossible!&nbsp; We could use an Oleg refactoring day where we apply cool things he&#39;s come up with :)<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
2) ortryrunning doesn&#39;t check for exceptions: in Windows a failed<br>
runProcess returns an exception.</blockquote><div>&nbsp;</div><div>So it looks like you made this changes:<br>+ortryrunning :: IO ExitCode -&gt; IO ExitCode -&gt; IO ExitCode<br>+a `ortryrunning` b = do ret &lt;- try a<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case ret of<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Right ExitSuccess) -&gt; return ExitSuccess<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _ -&gt; b<br><br>Just checking that I understand, this could also be:<br>a `ortryrunning` b = try a &gt;&gt;= either (const b) return<br>
<br>I didn&#39;t check to make sure that passes the type checker.&nbsp; The important bit is that you added &#39;try&#39; it would seem.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
3) runProcess on Windows require explicit &quot;.com&quot; suffix for .com<br>
executables. We should add &quot;<a href="http://more.com" target="_blank">more.com</a>&quot; to the list of possible pagers.</blockquote><div><br>I think others have looked into which program to execute so I&#39;ll let the expert handle this. <br>
<br></div></div>The changes look fine to me and if Salvatore says they work and the build bots keep running then I say it should go in!<br><br>Thanks Salvatore.<br><br>Jason<br></div>