It is called as whereis(Name). Returns the pid of the process that is registered with the name.
atom − This is the registered name to give to the process.
The process id bound to the atom.
-module(helloworld). -export([start/0, call/2]). call(Arg1, Arg2) -> io:fwrite("~p~n",[Arg1]). start() -> Pid = spawn(?MODULE, call, ["hello", "process"]), register(myprocess, Pid), io:fwrite("~p~n",[whereis(myprocess)]).
When we run the above program, we will get the following result.