12.3 Registered Processes
Besides addressing a process by using its pid, there are also BIFs for registering a process under a name. The name must be an atom and is automatically unregistered if the process terminates:
BIF | Description |
register(Name, Pid) | Associates the name Name, an atom, with the process Pid. |
registered() | Returns a list of names that have been registered using register/2. |
whereis(Name) | Returns the pid registered under Name, or undefined if the name is not registered. |
Table 12.1: Name Registration BIFs