summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2020-01-30 19:12:12 +0300
committerMichael Klishin <michael@clojurewerkz.org>2020-01-30 19:12:12 +0300
commit6a4d2721d06b8c70a36e29e6c51bbef6608def55 (patch)
treedef023bec87e22c4c542df1dfd76d28f01c94cf4 /src/rabbit.erl
parentd621ec907a4b7f33e85e4bc61f10d1c6e1ef0601 (diff)
downloadrabbitmq-server-git-6a4d2721d06b8c70a36e29e6c51bbef6608def55.tar.gz
Override OTP handlers to gracefully shut down on SIGTERM, SIGQUIT
otherwise the default handler will terminate the runtime. Closes #2222. Pair: @vanlightly.
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 35ffc6ea16..0bf6d47700 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -235,6 +235,12 @@
{requires, pre_flight}
]}).
+-rabbit_boot_step({os_signal_handler,
+ [{description, "registers an OS signal handler"},
+ {mfa, {rabbit_sup, start_restartable_child,
+ [rabbit_os_signal_handler]}},
+ {requires, pre_flight}]}).
+
-rabbit_boot_step({direct_client,
[{description, "direct client"},
{mfa, {rabbit_direct, boot, []}},