Hi!<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">When a process spawns (without link) another process, what happens if the spawned process crashes, mainly in a communication environment ?<br>

Does the memory release ? what is the impact on the first process ? on the sockets ?<br></blockquote><div><br>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.<br>
<br>But that's no fun! :)<br>You can checkout out these docs to see how a bunch of processes linked together behave/can be setup to behave:<br><ul><li><a href="http://erlang.org/doc/getting_started/robustness.html#4.2">http://erlang.org/doc/getting_started/robustness.html#4.2</a> (in <a href="http://erlang.org/doc/getting_started/part_frame.html">http://erlang.org/doc/getting_started/part_frame.html</a>)</li>
<li><a href="http://www.erlang.org/course/error_handling.html">http://www.erlang.org/course/error_handling.html</a></li><li><a href="http://erlang.org/doc/reference_manual/processes.html#10.7">http://erlang.org/doc/reference_manual/processes.html#10.7</a> (in <a href="http://erlang.org/doc/reference_manual/part_frame.html">http://erlang.org/doc/reference_manual/part_frame.html</a>)</li>
<li><a href="http://www.erlang.org/doc/man/erlang.html">http://www.erlang.org/doc/man/erlang.html</a></li></ul>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" notification.<br>
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 message.<br> <br></div><div>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". :)<br>
 <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(Documentation reference welcome !) <br></blockquote></div>Joe's book will get you a long way. :)<br><br>/Davide :)<br>