diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-11-02 14:27:45 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-11-02 14:27:45 +0000 |
| commit | 59697f8cc0e684e27629d9709de92ff1db8aca6b (patch) | |
| tree | 37f7c39e81eb9d2e561e02adc5c3bd7ed3454ed3 | |
| parent | b7b41085cca0b463df2509c3319009fb0187a0b2 (diff) | |
| download | rabbitmq-server-git-59697f8cc0e684e27629d9709de92ff1db8aca6b.tar.gz | |
Correct thinko - permanent + normal is an error, duh!
(And some slightly evil formatting, but I really don't want this to wrap.)
| -rw-r--r-- | src/supervisor2.erl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index bab47077d9..8a72caba0d 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -697,11 +697,12 @@ child_exit_reason(#child{}) -> shutdown. child_timeout(#child{shutdown = brutal_kill}) -> infinity; child_timeout(#child{shutdown = Time}) -> Time. -child_res(#child{shutdown = brutal_kill}, killed, false) -> ok; -child_res(#child{}, shutdown, false) -> ok; -child_res(#child{restart_type = permanent}, normal, false) -> ok; -child_res(#child{restart_type = {permanent, _}}, normal, false) -> ok; -child_res(#child{}, R, _) -> {error, R}. +child_res(#child{shutdown=brutal_kill}, killed, false) -> ok; +child_res(#child{}, shutdown, false) -> ok; +child_res(#child{restart_type=permanent}, normal, false) -> {error, normal}; +child_res(#child{restart_type={permanent,_}},normal, false) -> {error, normal}; +child_res(#child{}, normal, false) -> ok; +child_res(#child{}, R, _) -> {error, R}. do_terminate(Child, SupName) when Child#child.pid =/= undefined -> ReportError = shutdown_error_reporter(SupName), |
