[erlang-questions] otp application killing all spawned children, also ones not linked?

Bart van Deenen <>
Fri May 11 11:45:23 CEST 2012


Hi all

I've set up a simple test-case at 
https://github.com/bvdeenen/otp_super_nukes_all that shows that an otp 
application:stop() actually kills *all* spawned processes by its 
children, even the ones that are *not linked*.

The test-case consists of one gen_server (registered as par) spawning a 
plain erlang process (registered as par_worker) and a gen_server 
(registered as reg_child), which also spawns a plain erlang process 
(registered as child_worker). Calling application:stop(test_app) does a 
normal termination on the 'par' gen_server, but an exit(kill) on all others!

Is this nominal behaviour? If so, where is it documented, and can I 
disable it? I want the processes I spawn from my gen_server (not link), 
to stay alive when the application terminates.

Thanks

Bart van Deenen





More information about the erlang-questions mailing list