[erlang-questions] process - crash
Tue Apr 7 17:17:57 CEST 2009
When a process spawns (without link) another process, what happens if the
> spawned process crashes, mainly in a communication environment ?
> Does the memory release ? what is the impact on the first process ? on the
> sockets ?
Each erlang process is independent and if you don't setup a link/monitor it
will crash without any other process getting notified about it.
But that's no fun! :)
You can checkout out these docs to see how a bunch of processes linked
together behave/can be setup to behave:
- http://erlang.org/doc/getting_started/robustness.html#4.2 (in
- http://erlang.org/doc/reference_manual/processes.html#10.7 (in
Regarding the "in a communication environment" part... if you are sending a
message to a process and it crashes you won't get any "sending failed"
If you really want to make sure that the message was received *and
processed* then you have to notify the caller after finishing processing the
I believe/read somewhere that the garbage collection is done on a
per-process basis. When a process crashes the VM will "tidy things up". :)
> (Documentation reference welcome !)
Joe's book will get you a long way. :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions