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

Richard Andrews bbmaj7@REDACTED
Thu Jul 19 12:31:22 CEST 2007


Works OK for me.
R11B5 on FC4 built with gcc-4.0.2

Linux localhost.localdomain 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT
2006 i686 i686 i386 GNU/Linux


--- Ludovic Coquelle <lcoquelle@REDACTED> wrote:

> 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?



      ____________________________________________________________________________________ Yahoo!7 Mail has just got even bigger and better with unlimited storage on all webmail accounts.
http://au.docs.yahoo.com/mail/unlimitedstorage.html






More information about the erlang-questions mailing list