Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 461226

Summary: dev-db/mysql-init-scripts - init.d script does not close stdin
Product: Gentoo Linux Reporter: Ortwin Glueck <odi>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=498684
Whiteboard:
Package list:
Runtime testing required: ---

Description Ortwin Glueck 2013-03-10 10:50:32 UTC
mysqls keeps the terminal open as its stdin:
/proc/.../fd
lrwx------ 1 root  root  64 Mar 10 11:37 0 -> /dev/pts/2 (deleted)

Close it in the init script like so:
/etc/init.d/mysql:
# mysqld doesn't close stdin itself
exec 0>&-
start-stop-daemon \

Maybe closing streams appropriately would make a nice addition to start-stop-daemon as that is a standard responsibility of any daemon.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-03-10 19:26:19 UTC
It doesn't use s-s-d at all right now.
Comment 2 Ortwin Glueck 2013-03-11 08:52:03 UTC
Not sure what you mean:

$ equery l mysql
 * Searching for mysql ...
[IP-] [  ] dev-db/mysql-5.1.67:0

$ grep start-stop-daemon /etc/init.d/mysql 
        start-stop-daemon \
        start-stop-daemon \
Comment 3 Brian Evans (RETIRED) gentoo-dev 2013-03-11 14:43:11 UTC
This should be about dev-db/mysql-init-scripts package if anything as the init scripts are split off in their own package.
Comment 4 Brian Evans (RETIRED) gentoo-dev 2015-04-29 18:24:09 UTC
This is fixed in bug 498684 and OpenRC 0.14