diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-09-07 18:04:20 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-09-07 18:04:20 +0100 |
| commit | bc6df57d4b683ebbb73f3866c086a1fd285770bd (patch) | |
| tree | 330a4226f674ef68c07b3b1a60384907fe0a0fd7 /src | |
| parent | 56872898a114c270941c8c0c418102f4c6bebf4d (diff) | |
| parent | 9d2f1c7a3f40307202ea23890100e170e30b7a27 (diff) | |
| download | rabbitmq-server-git-bc6df57d4b683ebbb73f3866c086a1fd285770bd.tar.gz | |
merge bug23203 into default
Diffstat (limited to 'src')
| -rw-r--r-- | src/supervisor2.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index 4a1c5832b3..93adfcb1b5 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -34,7 +34,9 @@ %% 4) Added an 'intrinsic' restart type. Like the transient type, this %% type means the child should only be restarted if the child exits %% abnormally. Unlike the transient type, if the child exits -%% normally, the supervisor itself also exits normally. +%% normally, the supervisor itself also exits normally. If the +%% child is a supervisor and it exits normally (i.e. with reason of +%% 'shutdown') then the child's parent also exits normally. %% %% All modifications are (C) 2010 Rabbit Technologies Ltd. %% @@ -545,6 +547,9 @@ do_restart(permanent, Reason, Child, State) -> restart(Child, State); do_restart(intrinsic, normal, Child, State) -> {shutdown, state_del_child(Child, State)}; +do_restart(intrinsic, shutdown, Child = #child{child_type = supervisor}, + State) -> + {shutdown, state_del_child(Child, State)}; do_restart(_, normal, Child, State) -> NState = state_del_child(Child, State), {ok, NState}; |
