Package: rabbitmq-server
Version: 2.6.1-1
Severity: normal
Currently, the rabbitmq init script does this to invoke
/usr/sbin/rabbitmq-server ($DAEMON):
setsid sh -c "$DAEMON > ${INIT_LOG_DIR}/startup_log \
2> ${INIT_LOG_DIR}/startup_err" &
$CONTROL wait >/dev/null 2>&1
That leaves stdin and stdout and stderr open for that daemon process.
The issue with this is if the user does something like:
apt-get install rabbitmq-server | tee
The stdin from 'sh -c' to 'tee' will never get closed, and it will hang
around even after apt is well done. This sometimes shows itself on the
command line directly but is always reproducible with:
ssh root@hostname 'apt-get install -y rabbitmq-server | tee my.log'
This is Ubuntu bug 878600.
https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/878600
The fix is simply to do:
RABBITMQ_PID_FILE=$PID_FILE setsid $DAEMON \
> "${INIT_LOG_DIR}/startup_log" 2> ${INIT_LOG_DIR}/startup_err" 0<&- &
$CONTROL wait $PID_FILE >/dev/null 2>&1
Which then closes stdin, stdout, stderr explicitly for that subproces.
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500,
'oneiric'), (100, 'oneiric-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-12-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]