aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-12-15 18:07:13 +0100
committerBjörn-Egil Dahlberg <[email protected]>2017-01-19 14:24:47 +0100
commit40c82769def0cfa59e75669ff1c6fc4abcecd764 (patch)
treeba1f6bd4c8b92b0270d91b3843bf8bf82b8786fd /lib/kernel/src
parenta7b52ad679e6a58a9351a26e198eee70067b000f (diff)
downloadotp-40c82769def0cfa59e75669ff1c6fc4abcecd764.tar.gz
otp-40c82769def0cfa59e75669ff1c6fc4abcecd764.tar.bz2
otp-40c82769def0cfa59e75669ff1c6fc4abcecd764.zip
erts: Handle SIGTERM via signal service instead
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/erl_signal_handler.erl4
1 files changed, 4 insertions, 0 deletions
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}.