[erlang-questions] OTP question
Alpár Jüttner
alpar@REDACTED
Sun Aug 17 22:35:55 CEST 2008
Hi,
I have a fairly basic problem, probably I did a silly mistake. When I
stop an application, it does not terminate the supervisor tree. Please
find an example in the attachment. It is a minimal application with one
supervisor and a server. When I start the application, the supervisor
and the server starts nicely:
$erl
Erlang (BEAM) emulator version 5.6.3 [source] [smp:2]
[async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.6.3 (abort with ^G)
1> c(test_ser).
{ok,test_ser}
2> c(test_sup).
{ok,test_sup}
3> c(test_app).
{ok,test_app}
4> application:start(test_app).
TEST APP START.
TEST SUPERVISOR START LINK.
TEST SUPERVISOR INIT.
TEST SERVER START LINK.
TEST SERVER INIT.
ok
But when I stop it, test_app:stop/1 is executed, but
test_sup:terminate/1 and test_server:terminate/2 are not.
5> application:stop(test_app).
TEST APP STOP.
=INFO REPORT==== 17-Aug-2008::22:27:49 ===
application: test_app
exited: stopped
type: temporary
ok
6>
What do I do wrong?
Best regards,
Alpar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_ser.erl
Type: text/x-erlang
Size: 711 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080817/7094f0b3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_sup.erl
Type: text/x-erlang
Size: 428 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080817/7094f0b3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_app.erl
Type: text/x-erlang
Size: 232 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080817/7094f0b3/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_app.app
Type: text/x-matlab
Size: 192 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080817/7094f0b3/attachment-0003.bin>
More information about the erlang-questions
mailing list