[erlang-questions] erlang:exit/1 and erlang:exit/2

Richard Carlsson carlsson.richard@REDACTED
Wed Jul 30 12:40:59 CEST 2014


Note that exit/1 and exit/2 are completely different functions, hence the
difference in implementation complexity. exit/1 is similar to error/1 and
throw/1, while exit/2 would have been better named signal/2.


        /Richard


On Tue, Jul 29, 2014 at 9:19 PM, Leo Liu <sdl.web@REDACTED> wrote:

> Hi there,
>
> Could someone help me understand the implementation of erlang:exit/1?
>
>   BIF_RETTYPE exit_1(BIF_ALIST_1)
>   {
>       BIF_P->fvalue = BIF_ARG_1;  /* exit value */
>       BIF_ERROR(BIF_P, EXC_EXIT);
>   }
>
> which is pretty simple and I am not sure how it propagates the exit
> signal. erlang:exit/2 on the contrary is full of details.
>
> Thanks,
> Leo
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140730/156e6f25/attachment.htm>


More information about the erlang-questions mailing list