[erlang-questions] Two questions about open files and file descriptors

Daniel Dormont <>
Tue May 1 18:39:12 CEST 2012


Hello Erlangers,

I'm trying to chase down some 'emfile' errors that showed up in my
application. I have two questions about this:

1) Is there a way I can see, in a live system, supposing I have a console
open, the list of open files and/or file descriptors?

2) Suppose I have code running in a particular process that calls
file:open/2, writes some stuff using io:format/3, and then closes the file
using file:close/1. During this time, the descriptor returned by file:open
is kept only in local variables. Now, in the middle of computing "some
stuff", the process crashes. What happens to my open file?

-Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120501/14c45fdb/attachment.html>


More information about the erlang-questions mailing list