[erlang-questions] Passing Filehandles Between Processes

Jayson Vantuyl kagato@REDACTED
Sat Oct 10 08:54:53 CEST 2009

Are there any plans to add something like gen_tcp:controlling_process  
for files?  I don't see any easy way to do it, looking at file.erl  
(and gen_tcp hands it off to some magic in inet).

On Oct 9, 2009, at 4:45 PM, Scott Lystig Fritchie wrote:

> 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.  :-)
> -Scott
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org

Jayson Vantuyl

More information about the erlang-questions mailing list