[erlang-questions] escript cutting output

Tim Watson <>
Fri Nov 18 09:43:23 CET 2011


Have you tried this:

S = self(),
spawn_link(fun() -> io:format(Fmt, Data), S ! finished end),
receive
    finished ->
        halt(0);
    _Other -.
        halt(1)
end.

This is a different situation to the one Ulf was describing in that thread
I think.

On 18 November 2011 08:35, Samuel <> wrote:

> Hi,
>
> > FWIW, I think this is exactly the same problem as covered in a thread
> > earlier this year. Probably the most interesting post in that thread:
> >
> >  http://erlang.org/pipermail/erlang-questions/2011-April/057492.html
> >
> > My take is that there is no proper solution. Adding a 'sufficient'
> > timer:sleep works in practice, but it's less than completely
> > satisfying.
>
> Thanks, sorry for missing that thread, it's exactly the same.
>
> I though that using erl -noshell -eval '..., init:stop().' was
> working, but today I added more output and it fails again, so still no
> proper solution. At least, the bright side is that this behaviour is
> consistent :)
>
> Regards
> --
> Samuel
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111118/129f4bda/attachment.html>


More information about the erlang-questions mailing list