[erlang-bugs] erlang:halt/2 doesn't flush by default as advertised
José Valim
jose.valim@REDACTED
Tue Jul 30 00:39:23 CEST 2013
According to the documentation<http://erlang.org/doc/man/erlang.html#halt-2>,
erlang:halt/2 should flush unless {flush,false} is given:
For integer Status the Erlang runtime system closes all ports and allows
> async threads to finish their operations before exiting. To exit without
> such flushing use Option as {flush,false}.
However, we noticed that erlang:halt(0, []) is not flushing at all. Looking
at the code, we were able to verify it:
https://github.com/erlang/otp/blob/a5fc79292b9b018cd39d104a8cd2e79de141e3ad/erts/emulator/beam/bif.c#L3937
The value of flush should be initialized to 1.
Thank you!
PS: erlang:halt/0 and erlang:halt/1 **are** working as advertised.
*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Lead Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130730/a4d3680f/attachment.htm>
More information about the erlang-bugs
mailing list