[erlang-questions] Passing Filehandles Between Processes

Matthew Sackman <>
Thu Oct 8 22:25:34 CEST 2009


On Thu, Oct 08, 2009 at 11:41:17AM -0600, Erickson, John wrote:
> Hi, I have noticed that Erlang acts strangely when I pass a file handle from one process to another (for local threads).  It seems that the port sends the data back to the process that opened the file rather than the current one using the handle.  Is this a bug?  Or is there a reason this cannot be done?  The only workaround I have found is to close and reopen the file whenever I pass it to a new process.

I've seen that too actually, I put it down to opening the fh raw, which
is documented as meaning only the opening process can access the fh, but
I didn't investigate further to see if it worked opening not raw.

Matthew


More information about the erlang-questions mailing list