Get the name of a process

Given a process id, assuming the process is registered with a name, how can I get the name of the process?

Seems an odd use case but doable. Process.info(pid) can do it

https://hexdocs.pm/elixir/Process.html#info/1

Yes indeed. I found a better solution to my problem by using Process.monitor. Thank you nonetheless, very useful.