Determining if process is alive on a different node
Serge Aleynikov
serge@REDACTED
Mon Aug 15 21:06:00 CEST 2005
node(Pid) returns the node that owns the Pid.
Node = node(),
case node(Pid) of
Node -> local;
_ -> remote
end.
Joel Reymont wrote:
> Folks,
>
> I have a pid but I don't know if it's a local one. How would I
> determine if the process is alive?
>
> I'm storing pids in a Mnesia table in a multi-node environment and the
> node that hosted the process might have died. Rather than tracking node
> crashes I was wondering if there was an idiomatic way of figuring out
> if a process is alive.
>
> My understanding is that I can only use is_process_alive for local
> processes.
>
> Thanks, Joel
>
> --
> http://wagerlabs.com/uptick
>
>
>
>
--
Serge Aleynikov
R&D Telecom, IDT Corp.
Tel: (973) 438-3436
Fax: (973) 438-1464
serge@REDACTED
More information about the erlang-questions
mailing list