[erlang-questions] standard_error not handling eagain?
Sun Aug 9 17:03:33 CEST 2015
Thanks for a report that includes a way to reproduce the issue!
For reference, this has been reported a couple days ago as well:
Founder and Director of R&D
On Sun, Aug 9, 2015 at 2:53 PM, UENISHI Kota <kuenishi@REDACTED> wrote:
> Hi folks,
> I'm asking here as I'm not sure how it should be although this looks
> like a bug to me. Reproduced in MacOS (mine is 10.10.4) AND 18.0
> (maint-18 HEAD), but couldn't reproduce in Linux (Ubuntu 14.04) with
> 18.0 or R16B02 with Mac.
> To reproduce, it's pretty easy: just print out to standard_error by
> using io:put_char/1 or io:format/3, with writing a long iolist at
> least more than a thousand characters :
> main(_) ->
> Arg0 = [ [["1234567890" || _ <- [1,2,3,4,5,6,7,8,9,0]], 32,
> integer_to_list(L), $\n]
> || L <- lists:seq(1, 200) ],
> io:format(standard_error, "~p~n", [whereis(standard_error)]),
> R = io:put_chars(standard_error, Arg0),
> io:format(standard_error, "~p, ~p~n", [R, whereis(standard_error)]).
> My result of this code is also copied in that gist .
> This phenomena seems to happen when writing a long buffer to FD 2 via
> port driver and suddenly gets EAGAIN back, and the port exits with
> that error. I believe standard_error should not exit but should retry
> writing when eagain or eintr was received. Thoughts?
>  https://gist.github.com/kuenishi/76333a8a93bc8ccad308#file-stderr-erl
> UENISHI Kota :-)
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions