Process alive ?
Inswitch Solutions - Erlang Evaluation
erlang@REDACTED
Tue Dec 17 01:44:36 CET 2002
Ok, but I don't know the Pid of the process. For example I have a process
running in a node e1@REDACTED and another process running in a node
e2@REDACTED, from node e1 I need send a message to application running in e2
node, in node e1 I write the next code
{application, e2@REDACTED} ! {self(), "Message to send"},
receive
{ok, Reply} ->
.....
end
But if the application it's not running in the e2 node I don't receive any
error.
----- Original Message -----
From: "Vance Shipley" <vances@REDACTED>
To: "Inswitch Solutions - Erlang Evaluation" <erlang@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Monday, December 16, 2002 8:56 PM
Subject: Re: Process alive ?
>
> You can use erlang:process_info/1.
>
> 1> Pid = self().
> <0.25.0>
> 2> process_info(Pid).
> [{current_function,{erl_eval,expr,3}},
> {initial_call,{shell,evaluator,3}},
> {status,running},
> {message_queue_len,0},
> {messages,[]},
> {links,[<0.22.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {error_handler,error_handler},
> {priority,normal},
> {group_leader,<0.21.0>},
> {heap_size,233},
> {stack_size,13},
> {reductions,89},
> {garbage_collection,[{fullsweep_after,65535}]}]
> 3> banf = bang.
> ** exited: {{badmatch,bang},[{erl_eval,expr,3}]} **
> 4> self().
> <0.34.0>
> 5> process_info(Pid).
> undefined
>
> On Tue, Dec 17, 2002 at 08:40:27PM +0100, Inswitch Solutions - Erlang
Evaluation wrote:
> }
> } Does anyone know how can I check if a process running in a node is
alive ?
> }
> } Thanks,
> } Bernardo Paroli
> } INSwitch Solutions
> }
> }
> }
>
More information about the erlang-questions
mailing list