<br><br><div class="gmail_quote">On Mon, Nov 14, 2011 at 11:15 PM, Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca">feeley@iro.umontreal.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 2011-11-14, at 9:18 AM, Meng Zhang wrote:<br>
<br>
> After upgrading from 4.6.1 to 4.6.2, the problem solved.<br>
> Sorry for the outdated information..<br>
> --<br>
> Meng Zhang<br>
> Sent with Sparrow<br>
> On 2011年11月14日星期一 at 下午1:39, Meng Zhang wrote:<br>
><br>
>> When I played with blackhole's "bh install" command in osx, it stops at "Downloading packages".<br>
>> After I look into the source code, it seems the call to "with-output-to-process" in "untar" function causes this.<br>
>><br>
>> Below are code I wrote to reproduce the problem<br>
>><br>
>> (with-output-to-process<br>
>>   (list path: "sed"<br>
>>         arguments: '("-e" "s/n/N/g"))<br>
>>   (lambda ()<br>
>>     (display "nothing")))<br>
>><br>
<br>
</div>Actually, I can't get your example to run without an error on v4.6.2 .  Can I ask you what you expected your code to do?  </blockquote><div>This problem happened in 4.6.1, not 4.6.2</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
It is sending the text "nothing" to sed's input.  Are you expecting the output of sed to appear on the terminal?<br>
<br>
The procedure with-output-to-process gives to sed a *closed* file descriptor for its stdout.  This is why sed complains ("sed: stdout: Broken pipe").  If you didn't want this, you can give an stdout-redirection: #f setting and sed's stdout will be the same as the interpreter's stdout (usually the terminal):<br>
</blockquote><div>In 4.6.1, when I run the code above, the current thread sleeps forever.(since the stack frame is at "thread-sleep!")</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
(with-output-to-process<br>
  (list path: "sed"<br>
        arguments: '("-e" "s/n/N/g")<br>
</div>        stdout-redirection: #f)<br>
  (lambda ()<br>
    (display "nothing\n")))<br>
<br>
Perhaps blackhole should also use the stdout-redirection: #f setting.<br>
<font color="#888888"><br>
Marc<br>
<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>Zhang Meng<br>School of Software Engineering, Tongji University<br>MP: +86 151-2103-2798<br>