[erlang-questions] Questions about PID of remote process

Richard O'Keefe ok@REDACTED
Thu May 13 13:26:47 CEST 2010


On May 13, 2010, at 5:50 PM, Ulf Wiger wrote:

> On 05/13/2010 07:09 AM, 钱晓明 wrote:
>> Hi, I have two questions about pid of remote process:
>>
>> 1. How do I know if the remote process identified by one PID is  
>> alive? I
>> know I can send a message to it, and receive response with timeout.  
>> But I
>> hope there is some way more conveniently.
>
> If you monitor it, you will be notified when it dies - or immediately
> if it is already dead.

Here's a possible scenario.
T1: you learn about the existence of a remote process.
T2: you monitor it.
T3: it dies, and a message is launched to tell you that.
T4: is *NOW*.  According to the best possible information
     available to you, the process is still alive.
T5: the death notice arrives.

We inhabit a universe with a finite speed of light.
Learn to live with it.




More information about the erlang-questions mailing list