Created attachment 582954 [details, diff] xdm.initd.diff xdm.initd.diff can be applied to https://github.com/gentoo/gentoo
I really don't know anything about this code, so I'll probably need you to describe what message you're seeing and why it's useless as well as an explanation why this wouldn't disable potentially useful messages. FWIW, I don't see any examples of init scripts in the ebuild repo that pass --quiet twice to start-stop-daemon.
According to "start-stop-daemon --help" > -q, --quiet Run quietly (repeat to suppress errors) The first call of start-stop-daemon can fail. It probably fails because one type of call to start-stop-daemon cannot cover every display manager. That's why it is in an "if" statement. The second call of start-stop-daemon is in the "then" statement.
I think the first call to start-stop-daemon doesn't support lightdm. The second call supports it. I don't want to see an error message during 5 out of 10 shutdowns just because the first call to start-stop-daemon doesn't support lightdm for a reason that I don't know. I don't know why exactly it fails because /etc/init.d/xdm is quite complex.
It seems repeating --quiet twice doesn't actually suppress "xdm: no matching processes found". I'm experimenting with "2>/dev/null" at the end of the command.
(In reply to crocket from comment #4) > It seems repeating --quiet twice doesn't actually suppress "xdm: no matching > processes found". > > I'm experimenting with "2>/dev/null" at the end of the command. Where do you see these messages, for my own curiosity? In syslog?
"xdm: no matching processes found" is shown on a tty during shutdown. Do you not see a tty during shutdown?
(In reply to crocket from comment #6) > "xdm: no matching processes found" is shown on a tty during shutdown. > > Do you not see a tty during shutdown? I've used systemd for a few years, so I don't use the xdm.initd file.
Created attachment 583682 [details, diff] xdm.init.diff Since 2>/dev/null is added to start-stop-daemon --quiet --test --stop --exec "${myexe}", ignoring errors is ok. Errors from "test" invocations are not interesting.
I tested the patch for days. It works pretty well.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39a053a99e04391563810fe953112d2249317681 commit 39a053a99e04391563810fe953112d2249317681 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-07-30 01:38:30 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-07-30 01:49:41 +0000 x11-base/xorg-server: Suppress meaningless errors during shutdown Thanks to crocket for the patch. Closes: https://bugs.gentoo.org/689936 Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-base/xorg-server/files/xdm.initd-11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
It this really a meaningless error? I've got it on musl all the time, but never had the time to look into it yet.