Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461226 - dev-db/mysql-init-scripts - init.d script does not close stdin
Summary: dev-db/mysql-init-scripts - init.d script does not close stdin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-10 10:50 UTC by Ortwin Glueck
Modified: 2015-04-29 18:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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