[erlang-questions] Sockets and linking processes

Liam Clarke ml.cyresse@REDACTED
Sun Sep 24 03:48:18 CEST 2006


Hi all,

I have two processes (A and B to be totally original) - process B
handles a socket, based on messages from A. A parses data received
from B and responds accordingly.

I've linked A and B, but what I'm wondering is if A fails, which will
kill B also, if B's socket is still open, will it close it gracefully
or will it leave the remote end hanging?

If so, is there a way I can handle the exit signal so as to close the
socket without making B a system process? I still want B to exit with
A, just that I want B to tidy up before it does.

Regards,

Liam Clarke

PS - I'm up to Chapter 3 of Mr Armstrong's thesis - whoever said it
was the best introduction to Erlang is right. It's good to see the
_why_ of certain implementation decisions, as it helps in
comprehending the _how_.

And, as far as dissertations that I've read go, it's the most readable
by far, so kudos to Mr Armstrong for avoiding the sirens of academic
short hand.



More information about the erlang-questions mailing list