/etc/init.d/lighttpd stop function doesn't cover a case where there's more than one lighttpd process, i.e. by using workers for example. I elaborated here: https://forums.gentoo.org/viewtopic-t-1139476.html Anyways, my offered solution is to replace the stop function line: start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}" with the following line perhaps: start-stop-daemon --stop --quiet --name lighttpd.
My concern with that is the possibility of start-stop-daemon killing things that are not actually lighttpd, though it may be best if someone with more experience than myself chime in on this one. I think this is worth marking confirmed, because it is true that the current infrastructure can't handle multiple lighttpd processes.
yeah, i know my suggested solution probably doesn't holds the highest standard, I'm just not really well versed with shell/POSIX to suggest any better. probably, a more ideal solution would be to get all pIDs of all lighttpd processes running (including worker processes) and then the restart function may just loop over all of them or something.. if it's possible, i don't know how to do so from the init.d script though...
> /etc/init.d/lighttpd stop function doesn't cover a case where there's more than one lighttpd process, i.e. by using workers for example. Why not? Do you have evidence of this? If multiple lighttpd workers are used, then there is a primary lighttpd process that monitors those workers. When the primary lighttpd process is signalled, e.g. from /etc/init.d/lighttpd stop, then the primary lighttpd process propagates the signal to the lighttpd workers. Please review what signals are being sent to lighttpd and the expected behavior of those signals: https://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource#signals
As noted by Sam James, this is likely addressed in https://bugs.gentoo.org/626688
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f561442e589e60f79873b3f4db5e9935970ac46 commit 2f561442e589e60f79873b3f4db5e9935970ac46 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-07-24 01:48:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-24 01:48:52 +0000 www-servers/lighttpd: drop 1.4.55-r102, 1.4.58-r2, 1.4.59-r2 Bug: https://bugs.gentoo.org/851234 Bug: https://bugs.gentoo.org/830691 Bug: https://bugs.gentoo.org/803821 Signed-off-by: Sam James <sam@gentoo.org> www-servers/lighttpd/Manifest | 3 - www-servers/lighttpd/files/conf/lighttpd.conf | 279 --------------------- .../files/lighttpd-1.4.59-nspr-header.patch | 16 -- www-servers/lighttpd/files/lighttpd.initd | 79 ------ www-servers/lighttpd/lighttpd-1.4.55-r102.ebuild | 247 ------------------ www-servers/lighttpd/lighttpd-1.4.58-r2.ebuild | 268 -------------------- www-servers/lighttpd/lighttpd-1.4.59-r2.ebuild | 242 ------------------ www-servers/lighttpd/metadata.xml | 2 - 8 files changed, 1136 deletions(-)
(In reply to gstrauss from comment #4) > As noted by Sam James, this is likely addressed in > https://bugs.gentoo.org/626688 Thanks for all the help!