Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500182 - net-print/cups-filters - cups-browsed should close stdin
Summary: net-print/cups-filters - cups-browsed should close stdin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Printing Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-02-03 13:20 UTC by Ortwin Glueck
Modified: 2017-02-16 23:53 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 2014-02-03 13:20:50 UTC
cups-browsed does not close it's stdin, so it leaves us with an open file to a non-existant pts:
# ls -la /proc/18715/fd
total 0
dr-x------ 2 root root  0 Feb  3 14:00 .
dr-xr-xr-x 7 root root  0 Feb  3 14:00 ..
lrwx------ 1 root root 64 Feb  3 14:00 0 -> /dev/pts/1 (deleted)
lrwx------ 1 root root 64 Feb  3 14:00 1 -> /dev/null
lrwx------ 1 root root 64 Feb  3 14:00 2 -> /dev/null
lrwx------ 1 root root 64 Feb  3 14:00 3 -> socket:[8856662]
lrwx------ 1 root root 64 Feb  3 14:00 4 -> socket:[8856661]
lrwx------ 1 root root 64 Feb  3 14:00 5 -> anon_inode:[eventfd]

We can workaround this issue by closing it explicitly before calling start-stop-daemon in the init script like so:

exec 0>&-
start-stop-daemon --start --make-pidfile --pidfile "${PIDFILE}" \
                --background --quiet --exec /usr/sbin/cups-browsed


Maybe closing stdin would also be a good thing to do for start-stop-daemon by default, or by an explicit option. Because we have seen the same problem also with mysql.

Reproducible: Always
Comment 1 Jan-Matthias Braun 2016-02-22 16:52:36 UTC
Hi!

As of cups-filters 1.8.2 this seems to be solved.

Cheers,

Jan
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2017-02-16 23:53:00 UTC
(In reply to Jan-Matthias Braun from comment #1)
> Hi!
> 
> As of cups-filters 1.8.2 this seems to be solved.
> 
> Cheers,
> 
> Jan

Excellent, thanks.