How do I get the atom under which a process is registered?

Michael Turner leap@REDACTED
Tue Dec 15 11:33:58 CET 2009


You can register processes under atoms, which I like very much.  (Maybe
too much: it's a little like having global variables.) But I haven't
found a function like "registered_under/1" that, given a pid, returns
an atom if the process is registered with one.  (It can throw an
exception or return false, if it's not registered.  I don't really
care which.)

I can see how to write a function like that, if necessary.  I'm just
wondering if such a function already exists.  Maybe I'm looking in the
wrong place, or maybe it's undocumented.

-michael turner




More information about the erlang-questions mailing list