diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-08-11 14:46:05 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-08-11 14:47:57 +0200 |
| commit | 0afe1f6693d45a6e30ee53595f7147f331a81177 (patch) | |
| tree | 63954e7525fc4a9e6e45ab19c9b6226c067cfbd6 /scripts/rabbitmq-server | |
| parent | 54bbf0083ab648c916f92dbf6bf143103822b588 (diff) | |
| download | rabbitmq-server-git-0afe1f6693d45a6e30ee53595f7147f331a81177.tar.gz | |
rabbitmq-server: Don't catch EXIT "signal"
The only reason for the script to terminate is that RabbitMQ exited. By
trying to stop it again in the EXIT signal handler, we could stop a
newer instance of RabbitMQ. This caused the testsuite to fail in an
unexpected way.
References #234.
Diffstat (limited to 'scripts/rabbitmq-server')
| -rwxr-xr-x | scripts/rabbitmq-server | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 6a16a4971a..71a6530321 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -155,10 +155,8 @@ if [ 'x' = "x$RABBITMQ_ALLOW_INPUT" -a -z "$detached" ]; then # SIGINT # They are considered an abnormal process termination, the script # exits with the job exit code. - # EXIT - # This is not a signal. The script exits with the job exit code. - trap "stop_rabbitmq_server; trap - EXIT; exit 0" HUP TERM TSTP - trap "stop_rabbitmq_server; trap - EXIT" EXIT INT + trap "stop_rabbitmq_server; exit 0" HUP TERM TSTP + trap "stop_rabbitmq_server" INT start_rabbitmq_server "$@" & |
