[erlang-questions] Erlang shell, process dictionary & rand:seed

Roger Lipscombe roger@REDACTED
Thu Jan 12 10:58:06 CET 2017


On 12 January 2017 at 08:41, Raimo Niskanen
<raimo+erlang-questions@REDACTED> wrote:
> It is a shell feature.
>
> Notice below - an "** exception error:" is different from
> "*** Shell process terminated! ***".  1/0 is as well as most other
> exceptions is caught by the evaluator so the process will not exit.

Except that the process *does* exit (note that my shell displays the
pid in the prompt, but I've added self() calls to be clear):

Erlang/OTP 17 [erts-6.4.1.2] [source-73fc7ca] [64-bit] [smp:12:12]
[async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.4.1.2  (abort with ^G)
<0.33.0> 1> self().
<0.33.0>
<0.33.0> 2> put(a, 1).
undefined
<0.33.0> 3> get().
[{a,1}]
<0.33.0> 4> 1/0.
** exception error: an error occurred when evaluating an arithmetic expression
     in operator  '/'/2
        called as 1 / 0
<0.38.0> 5> self().
<0.38.0>
<0.38.0> 6> get().
[{a,1}]



More information about the erlang-questions mailing list