Determining if process is alive on a different node
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
Joel Reymont wrote:
> 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
> Thanks, Joel
R&D Telecom, IDT Corp.
Tel: (973) 438-3436
Fax: (973) 438-1464
More information about the erlang-questions