[erlang-questions] Programming Erlang book code question
Mon Oct 22 04:22:26 CEST 2007
For question 2, appearently if any worker process dies, it will also cause
the supervisor to be killed. That's why the unlink is there. For example,
if the supervisor process is started, and you call a worker process with
incorrect number of arguments it will cause the supervisor to be killed.
You are right about question 3, it makes a lot of sense now.
For question 1, I tried out the code from the book, and I still don't
understand why the spawn is there fully. You could be right about the
quicker initialization, but I think there's another reason for it. If I
call the start() from the shell, I can't access the worker process that is
managed by the supervisor. In fact, I have no idea how I can access the
worker process at all. However if I call start_in_shell_for_testing() in
the shell, I can access the worker process like usual.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions