[erlang-questions] Erlang VM crashed due to io output?

Ludovic Coquelle lcoquelle@REDACTED
Thu Jul 19 11:16:12 CEST 2007


Sorry for posting again this question, but I think there is something
important to know and I can't figure out what.

I run a command printing simple text on default io device (stdout):
bash> erl -noshell -eval "lists:foreach(fun(N) -> io:format(\"~w~n\", [N])
end, lists:seq(1,5)), erlang:halt()."
1
2
3
4
5

That's the behaviour I expected.
But if I try to pipe the result, erlang crash:
bash> erl -noshell -eval "lists:foreach(fun(N) -> io:format(\"~w~n\", [N])
end, lists:seq(1,5)), erlang:halt()." | head -n 3
1
2
3
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

What's happening?
Is it a normal behaviour?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070719/da09f02f/attachment.htm>


More information about the erlang-questions mailing list