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. can do it

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