Know if process is monitored

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Know if process is monitored

Roberto Ostinelli-5
All,
Is there a way to know if a process is monitored after a call to erlang:monitor/2, end even better get the references() after that?

Thank you,
r.
Reply | Threaded
Open this post in threaded view
|

Re: Know if process is monitored

Michael Uvarov-2
erlang:process_info(PID, monitored_by)
Returns a list of pids who monitor process with PID Pid.

On Mon, 11 Nov 2019, 09:56 Roberto Ostinelli, <[hidden email]> wrote:
All,
Is there a way to know if a process is monitored after a call to erlang:monitor/2, end even better get the references() after that?

Thank you,
r.
Reply | Threaded
Open this post in threaded view
|

Re: Know if process is monitored

Roberto Ostinelli-5
Thank you Michael,
And obviously it was there in some place I didn't find. :D