[erlang-questions] Erlang/OTP 21.0-rc1 (Release Candidate)

Lukas Larsson lukas@REDACTED
Mon May 7 09:59:54 CEST 2018


Hello,

On Fri, May 4, 2018 at 7:23 PM, Michał Muskała <michal@REDACTED> wrote:

> The release looks great. Thank you to the whole OTP team for the work you
> put into it.
>

Thanks!


>
> I wonder about the new file implementation that uses NIFs instead of
> ports, specifically the instrumentation around it. With ports, there was a
> way to list all ports and filter those that are files. This proved
> sometimes useful in debugging situations. Would it be possible to also get
> some kind of API to list all opened files, possibly with some additional
> information (like path)?
> I imagine a need for an API like that would be even more pressing once
> sockets are ported to use NIFs instead of ports as well.
>

Yes, I also believe that something like this is going to be needed. While
it is possible on most OSs to look in the /proc/ fs to see which files are
opened, it is definitely useful to be able to track back to the process
controlling it. Even more so for sockets.

Personally I would prefer not to have to build something new within erts to
handle this, but instead use what we have. Maybe ets tables that keeps
track of files, connections, etc.

Each sockets will most likely have to be associated with a process, so for
them it could be possible to just store something in the process dictionary
and let the debug process get the pdict of all processes.

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180507/83feb247/attachment.htm>


More information about the erlang-questions mailing list