diff options
Diffstat (limited to 'scripts/rabbitmq-server')
| -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 "$@" & |
