Have you tried this:<div><br></div><div>S = self(),</div><div>spawn_link(fun() -> io:format(Fmt, Data), S ! finished end),</div><div>receive</div><div> finished -></div><div> halt(0);</div><div> _Other -.<br>
halt(1)</div><div>end.</div><div><br></div><div>This is a different situation to the one Ulf was describing in that thread I think.<br><br><div class="gmail_quote">On 18 November 2011 08:35, Samuel <span dir="ltr"><<a href="mailto:samuelrivas@gmail.com">samuelrivas@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<div class="im"><br>
> FWIW, I think this is exactly the same problem as covered in a thread<br>
> earlier this year. Probably the most interesting post in that thread:<br>
><br>
> <a href="http://erlang.org/pipermail/erlang-questions/2011-April/057492.html" target="_blank">http://erlang.org/pipermail/erlang-questions/2011-April/057492.html</a><br>
><br>
> My take is that there is no proper solution. Adding a 'sufficient'<br>
> timer:sleep works in practice, but it's less than completely<br>
> satisfying.<br>
<br>
</div>Thanks, sorry for missing that thread, it's exactly the same.<br>
<br>
I though that using erl -noshell -eval '..., init:stop().' was<br>
working, but today I added more output and it fails again, so still no<br>
proper solution. At least, the bright side is that this behaviour is<br>
consistent :)<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888">--<br>
Samuel<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>