From 40c82769def0cfa59e75669ff1c6fc4abcecd764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 15 Dec 2016 18:07:13 +0100 Subject: erts: Handle SIGTERM via signal service instead --- lib/kernel/src/erl_signal_handler.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/kernel') diff --git a/lib/kernel/src/erl_signal_handler.erl b/lib/kernel/src/erl_signal_handler.erl index 6bd8f992a7..04130eac66 100644 --- a/lib/kernel/src/erl_signal_handler.erl +++ b/lib/kernel/src/erl_signal_handler.erl @@ -28,6 +28,10 @@ init(_Args) -> {ok, #state{}}. +handle_event(sigterm, S) -> + error_logger:info_msg("SIGTERM received - shutting down~n"), + ok = init:stop(), + {ok, S}; handle_event(_SignalMsg, S) -> {ok, S}. -- cgit v1.2.3