diff options
| author | Gerhard Lazu <gerhard@users.noreply.github.com> | 2020-02-20 16:42:11 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-20 16:42:11 +0000 |
| commit | 278a1fedfb569b8b6b1dd56a44f0a01fa3500a43 (patch) | |
| tree | bcebfcc7ab422f295be9ae46e65299c118ce7eca /scripts | |
| parent | 1081e8ed4f76f1dded34a838b9e48bc3016d181e (diff) | |
| parent | 02aa73c36b720ae713d182ede1b8fc59966fcb41 (diff) | |
| download | rabbitmq-server-git-278a1fedfb569b8b6b1dd56a44f0a01fa3500a43.tar.gz | |
Merge pull request #2244 from rabbitmq/only-handle-SIGHUP-and-SIGTSTP
Only handle SIGHUP and SIGTSTP
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/rabbitmq-server | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 5939c845d2..0976c5566a 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -141,7 +141,9 @@ else # Signal handlers. They all stop RabbitMQ properly, using # rabbitmqctl stop. This script will exit with different exit codes: - # SIGHUP SIGTERM SIGTSTP + # SIGHUP, SIGTSTP + SIGCONT + # Ignored until we implement a useful behavior. + # SIGTERM # Exits 0 since this is considered a normal process termination. # SIGINT # Exits 128 + $signal_number where $signal_number is 2 for SIGINT (see @@ -150,7 +152,12 @@ else # don't need to specify this exit code because the shell propagates it. # Unfortunately, the signal handler doesn't work as expected in Dash, # thus we need to explicitly restate the exit code. - trap "stop_rabbitmq_server; exit 0" HUP TERM TSTP + # + # The behaviors below should remain consistent with the + # equivalent signal handlers in the Erlang code + # (see apps/rabbitmq_prelaunch/src/rabbit_prelaunch_sighandler.erl). + trap '' HUP TSTP CONT + trap "stop_rabbitmq_server; exit 0" TERM trap "stop_rabbitmq_server; exit 130" INT start_rabbitmq_server "$@" & |
