** exception exit: noconnection

Adam Lindberg hello@REDACTED
Wed Dec 4 16:06:07 CET 2019

It does receive an exit signal, and then dies because of it, no?

To further split hairs: it’s not killed by anyone specifically (i.e. exit(ShellProcess, kill)), it dies just like any other Erlang process because it receives an exit signal from a linked process. I’m pretty sure there is _some_ process _somewhere_ that also catches the error and makes sure the printout is  done. I don’t know if it is the current shell process or some higher level manager process though (as I didn’t read the source code).

And to go ever further down the rabbit hole: there is no such thing as “killing” an Erlang process. You can only send exit signals. It’s just that there is a special exit signal (‘kill’) that is uncatchable and where the VM makes sure the process dies.


> On 4. Dec 2019, at 15:37, Roger Lipscombe <roger@REDACTED> wrote:
> On Wed, 4 Dec 2019 at 11:17, Adam Lindberg <hello@REDACTED> wrote:
>> Perhaps something along the lines of:
>>    (test@REDACTED)1> my_test:start().
>>    Running...
>>    ** shell process received exit signal: noconnection
>>    (test@REDACTED)2>
> Except: the shell process isn't receiving an exit signal. It's being
> killed. You can see that if you examine self() before and after that
> message -- the REPL restarts the shell process.
> To make this more obvious, I have a custom prompt which displays the
> shell's pid: https://github.com/rlipscombe/rl_erl_prompt [1].
> But even with that said, the message could be improved, certainly.
> [1]: I note in passing that there's actually attempted support for
> colour in there. I could never get it working.

More information about the erlang-questions mailing list