[debian-mysql] Bug#602813: /etc/init.d/mysql: init script leaks file descriptors
Arthur de Jong
arthur at west.nl
Mon Nov 8 13:00:44 UTC 2010
Subject: /etc/init.d/mysql: init script leaks file descriptors
Package: mysql-server-5.1
Version: 5.1.49-2
File: /etc/init.d/mysql
Severity: normal
The /etc/init.d/mysql script leaks file descriptors to
the /usr/bin/mysqld_safe script. This causes problems problems for
unattended-upgrades (see #379645) and is generally considered a bad idea
(can also cause other problems).
It is probably simplest to use start-stop-daemon in the init script.
This closes all file descriptors and redirects to /dev/null (as well as
all kind of other things a daemon should do to correctly background
itself).
Using start-stop-daemon can be done by by replacing:
/usr/bin/mysqld_safe > /dev/null 2>&1 &
with:
start-stop-daemon --start --background --quiet --exec /usr/bin/mysqld_safe
in the script.
Thanks.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (900, 'testing'), (800, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.35-rc5-686 (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
--
-- arthur de jong - arthur at west.nl - west consulting b.v. --
More information about the pkg-mysql-maint
mailing list