<div>Dirty hack for processes don't kill by application:stop/1:</div><div>diff --git a/par.erl b/par.erl</div><div>index f2232c2..207b5c7 100644</div><div>--- a/par.erl</div><div>+++ b/par.erl</div><div>@@ -41,6 +41,7 @@ code_change(_OldVsn, State, _Extra) -> {ok, State}.</div><div>š</div><div>šworker() ->š</div><div>š š š š register(par_worker, self()),</div><div>+ š š š group_leader(whereis(init), self()),</div><div>š</div><div>š š š š receive Any -> io:format("~p Parent worker received ~p~n",š</div><div>š š š š [self(), Any]) end.</div><div>š</div><div>š</div><div>š</div><div>11.05.2012, 16:45, "Bart van Deenen" <Bart.vanDeenen@spilgames.com>:</div><div>> Hi all</div><div>></div><div>> I've set up a simple test-case at</div><div>> https://github.com/bvdeenen/otp_super_nukes_all that shows that an otp</div><div>> application:stop() actually kills *all* spawned processes by its</div><div>> children, even the ones that are *not linked*.</div><div>></div><div>> The test-case consists of one gen_server (registered as par) spawning a</div><div>> plain erlang process (registered as par_worker) and a gen_server</div><div>> (registered as reg_child), which also spawns a plain erlang process</div><div>> (registered as child_worker). Calling application:stop(test_app) does a</div><div>> normal termination on the 'par' gen_server, but an exit(kill) on all others!</div><div>></div><div>> Is this nominal behaviour? If so, where is it documented, and can I</div><div>> disable it? I want the processes I spawn from my gen_server (not link),</div><div>> to stay alive when the application terminates.</div><div>></div><div>> Thanks</div><div>></div><div>> Bart van Deenen</div><div>></div><div>> _______________________________________________</div><div>> erlang-questions mailing list</div><div>> erlang-questions@erlang.org</div><div>> http://erlang.org/mailman/listinfo/erlang-questions</div><div>Drityš</div><div>--</div><div>๓ ีืมึลฮษล เาษฮ</div>