aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2013-09-12 12:09:51 +0200
committerPeter Andersson <[email protected]>2013-09-12 12:10:40 +0200
commit39d1c9f9f3d63a597fdc21494877cace931a8494 (patch)
treed9a5c13f1da40488b831f4de4c1d6937e9467465 /lib/common_test
parent97749b58dc4ddd2982d73175d668df0f5948768d (diff)
parent0d331c232ea89450176140a88e79f9a514ed8899 (diff)
downloadotp-39d1c9f9f3d63a597fdc21494877cace931a8494.tar.gz
otp-39d1c9f9f3d63a597fdc21494877cace931a8494.tar.bz2
otp-39d1c9f9f3d63a597fdc21494877cace931a8494.zip
Merge branch 'peppe/common_test/init_stop_problem' into maint
* peppe/common_test/init_stop_problem: Make builtin hook respond to init:stop OTP-11175
Diffstat (limited to 'lib/common_test')
-rw-r--r--lib/common_test/src/cth_log_redirect.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl
index 11af1aa346..4ee7e48a67 100644
--- a/lib/common_test/src/cth_log_redirect.erl
+++ b/lib/common_test/src/cth_log_redirect.erl
@@ -135,8 +135,19 @@ handle_event(Event, #eh_state{log_func = LogFunc} = State) ->
end,
{ok, State}.
+handle_info({'EXIT',User,killed}, State) ->
+ case whereis(user) of
+ %% init:stop/1/2 has been called, let's finish!
+ undefined ->
+ remove_handler;
+ User ->
+ remove_handler;
+ _ ->
+ {ok,State}
+ end;
-handle_info(_,State) -> {ok, State}.
+handle_info(_, State) ->
+ {ok,State}.
handle_call(flush,State) ->
{ok, ok, State};