Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  [erlang-questions] Erlang's process not killed by exit sign

uwiger
Posted: Thu Oct 29, 2009 9:57 am Reply with quote
User Joined: 03 Jul 2006 Posts: 604 Location: Sweden
Joe Armstrong wrote:
>
> The distinction between messages and signals is subtle.

One way to verify that it is indeed as Joe says:

Eshell V5.6.5 (abort with ^G)
1> P = spawn(fun() -> timer:sleep(infinity) end).
<0.32.0>
2> P ! {'EXIT',self(),foo}.
{'EXIT',<0.30.0>,foo}
3> is_process_alive(P).
true
4> exit(P,foo).
true
5> is_process_alive(P).
false
6>

In other words, you cannot fake an exit signal by sending
an {'EXIT',P,R} message.

BR,
Ulf W
--
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com

________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org

Post received from mailinglist
View user's profile Send private message Visit poster's website
uwiger
Posted: Thu Oct 29, 2009 2:04 pm Reply with quote
User Joined: 03 Jul 2006 Posts: 604 Location: Sweden
Robert Virding wrote:
>
> BUT when I do exit(kill) I send a type 2 signal with value 'kill' which
> doesn't behave as a type 3 'kill' signal though the name is the same. This
> is inconsistent, and I don't like inconsistencies. There are two different
> solutions: either send out real type 3 kill signals; or send out type 2
> 'killed' signals as if I had received a type 3 signal. Both are consistent,
> but which is best?

Why send out type 3 kill signals?

What is that consistent with?

I think the consistent behaviour would be to send out type 2
'killed' signals.

BR,
Ulf W
--
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com

________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org

Post received from mailinglist
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum