It is possible to call link(pid)
in Erlang to link the currently executing process to the process identified by pid
. Is it possible to link a process to another if it is not currently executing?
No, you cannot.
You can only link
/unlink
from a current process to another one. If the other process is not alive, you will get a noproc
error (if you are trapping exits) or receive an exit signal (if you are not trapping exits or if the other process was on another node).
You can also use spawn_link
to spawn and link in one atomic operation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With