diff options
author | Siri Hansen <[email protected]> | 2018-12-03 11:29:17 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-12-03 11:29:17 +0100 |
commit | 4b52744f70706a02b82b9741cf92718f910da582 (patch) | |
tree | 52626c80398a9c4cbfc63818b2c59394e88a4dc4 /lib/kernel | |
parent | 5d54149906b6f6d6cdd345a969ad1d1fa356f007 (diff) | |
parent | 721b04340b666d476732dfba31f5c89091085d6e (diff) | |
download | otp-4b52744f70706a02b82b9741cf92718f910da582.tar.gz otp-4b52744f70706a02b82b9741cf92718f910da582.tar.bz2 otp-4b52744f70706a02b82b9741cf92718f910da582.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/src/logger_simple_h.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/kernel/src/logger_simple_h.erl b/lib/kernel/src/logger_simple_h.erl index 8b51dd8569..fe181722f3 100644 --- a/lib/kernel/src/logger_simple_h.erl +++ b/lib/kernel/src/logger_simple_h.erl @@ -50,7 +50,6 @@ removing_handler(#{id:=simple}) -> ok; Pid -> Ref = erlang:monitor(process,Pid), - unlink(Pid), Pid ! stop, receive {'DOWN',Ref,process,Pid,_} -> ok @@ -99,7 +98,11 @@ loop(Buffer) -> replay_buffer(Buffer); _ -> ok - end; + end, + %% Before stopping, we unlink the logger process to avoid + %% an unexpected EXIT message + unlink(whereis(logger)), + ok; {log,#{msg:=_,meta:=#{time:=_}}=Log} -> do_log(Log), loop(update_buffer(Buffer,Log)); |