trap_exit cannot trap signal when exit/1 doesn't called explicitly

lang er erlangist@REDACTED
Tue Aug 22 19:37:29 CEST 2006


I write another small module, It works well, so what's wrong with
link_demo?


-module(dd).

-export([test/0,test1/0]).

test() ->
    process_flag(trap_exit, true),
    link(spawn(dd, test1,  [])),
    t().

test1() ->
    ok.
t() ->
    receive
        Any ->
                    io:format("~w~n",[Any])
    end.


> Thanks!
> Best Regards
> James
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060823/e2738c69/attachment.htm>


More information about the erlang-questions mailing list