Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cups-polld doesn't notice if the cups it was logging stderr messages to goes away #2640
Currently if cupsd is killed by something which means it doesn't clean up child polld processes then the cups-pollds carry on running.
(actually in our case cupsd just died/crashed but it could have been violently killed with the same effect).
Running strace/truss on the cups-polld shows it still trying to send messages to stderr which reports EPIPE (here at least other OSs may be different), but those errors arn't checked for. It is also still sending the update messages to the udp socket but those arn't easy to error check.
On starting a new cupsd it launches it's own cups-polld children so the old ones arn't needed anyway.
I think it should be sagfe to add a check for ferror(stderr) and/or foef(stderr) in the main loop and terminate if the parent has gone away.
This is (obviously) very very low priority 'cos it doesn't stop anything from actually working, it would take a long time for the extra load to become a problem and really cupsd shouldn't just die...
--- scheduler/cups-polld.c (revision 7178)