small medium large xlarge

25 Jun 2011, 22:43
Justin Calleja (5 posts)

Hi there,

I’m a bit confused about the first row in chapter 9’s “what happens when an exit signal arrives at a process” table on page 155 of the book.

If the reason is kill then the process (be it a system process or otherwise) is meant to die right? That’s what the row in the table, and the paragraph following it state.

But on page 161, executing

edemo1:start(true, {die,kill}).

leaves the process b alive… the tuple {die, kill} means that process c will evaluate exit(kill) which, since process c and b are linked, will send an exit signal to process b. Isn’t this meant to kill b?

The result of evaluating the previous expression is:

Process b received {‘EXIT’, some-Pid, kill} process b (some-other-Pid) is alive process c (some-Pid) is dead

As the result shows, process b is still alive but it received a kill signal, which it turned into a message and put in process b’s mailbox.

Am I missing something here?

Thanks, Justin

You must be logged in to comment