[erlang-questions] Passing Filehandles Between Processes

Scott Lystig Fritchie fritchie@REDACTED
Fri Oct 9 23:45:44 CEST 2009

Davide Marquês <nesrait@REDACTED> wrote:

dm> - finally, *the process that opened the file must be alive for
dm> read/write operations to succeed*.

This behavior is pretty clearly documented in the R13B02's reference for
the file:open/2 function.  The process linking (for non-raw file
handles) or port linking (for raw file handles) is an important way to
avoid leaking file handles when processes crash.  It doesn't prevent
leaks if a process lives forever but never closes a file handle (or
socket, for that matter), but 9/10ths of a pastrami sandwich is better
than no sandwich.  :-)


More information about the erlang-questions mailing list