<html><head><style type="text/css">.style1 {font-family: "Times New Roman";}</style></head><body><BR>
<BR>
> On 22 Apr 2021, at 09:56, Sverker Eriksson <sverker.eriksson@ericsson.com> wrote:<BR>
><BR>
><BR>
> If enif_monitor_process(_, Rsrc, Proc, _) returns 0 (success) then the monitor is active and the down callback is guaranteed to be called when process Proc terminates, unless<BR>
> • the resource Rsrc was deallocated before. The destructor callback will always be the last callback of a resource object.<BR>
> • the monitor was cancelled before with enif_demitor_process().<BR>
><BR>
> If the target process has already been killed then enif_monitor_process() is guaranteed to fail. There is no in between race, as with all other monitor and link creation.<BR>
<BR>
Excellent. Thanks once again for the confirmation.<BR>
<BR>
> Side note:<BR>
> A dirty NIF can check the liveness of its process with enif_is_current_process_alive() without the need of self monitoring.<BR>
<BR>
I am aware of that; thank you. enif_is_current_process_alive() has a (relatively)<BR>
high latency and I would prefer to avoid it.<BR>
<BR>
Regards,<BR>
<BR>
Robert<BR>
<BR>
<BR>
Confidentiality Notice | This email and any included attachments may be privileged, confidential and/or otherwise protected from disclosure. Access to this email by anyone other than the intended recipient is unauthorized. If you believe you have received this email in error, please contact the sender immediately and delete all copies. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.<BR>
<br><br><p style="font-family: Verdana; font-size:10pt; color:#666666;"><b>Disclaimer</b></p><p style="font-family: Verdana; font-size:8pt; color:#666666;">The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.<br><br>This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.</p></body></html>