[erlang-questions] Registered names and pids

Michael McDaniel erlangy@REDACTED
Wed May 14 05:25:01 CEST 2008


On Tue, May 13, 2008 at 07:59:57PM -0700, Deryk Barker wrote:
> Maybe I shouldn't need to know this, but I can't find any obvious way: 
> is it possible, given the name of a registered process, to find its pid: 
> a) on the same nod b) on another node?
> _______________________________________________

 
  see modules global and erlang

  e.g. ...

(fu@REDACTED)53> global:registered_names().
[mail_block_gserver,
 zadora_block_gserver,
 xq02_block_gserver,
 autosys_alarm,
 cougora_block_gserver]
(fu@REDACTED)54> global:whereis_name(mail_block_gserver). 
<5656.288.0>
(fu@REDACTED)55> global:whereis_name(autosys_alarm).     
<5447.76.0>
(fu@REDACTED)56> self().
<0.8952.0>
(fu@REDACTED)57> erlang:registered().
[auth,
 net_sup,
 net_kernel,
 kernel_sup,
 application_controller, ... ]
(fu@REDACTED)58> erlang:whereis(net_sup).
<0.17.0>


~Michael



> 
> Merci.
> 
> -- 
> |Deryk Barker, Computer Science Dept. | Music does not have to be understood|
> |Camosun College, Victoria, BC, Canada| It has to be listened to.           |
> |email: dbarker@REDACTED         |                                     |
> |phone: +1 250 370 4452               |         Hermann Scherchen.          |
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

-- 
Michael McDaniel
Portland, Oregon, USA
http://autosys.us
+1 503 283 5284



More information about the erlang-questions mailing list