Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689936 - x11-base/xorg-server - files/xdm.initd-11: Suppress meaningless errors during shutdown
Summary: x11-base/xorg-server - files/xdm.initd-11: Suppress meaningless errors during...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-07-15 23:49 UTC by anonymous
Modified: 2019-07-30 04:44 UTC (History)
0 users

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


Attachments
xdm.initd.diff (xdm.initd.diff,642 bytes, patch)
2019-07-15 23:49 UTC, anonymous
Details | Diff
xdm.init.diff (xdm.initd.diff,582 bytes, patch)
2019-07-20 02:28 UTC, anonymous
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description anonymous 2019-07-15 23:49:00 UTC
Created attachment 582954 [details, diff]
xdm.initd.diff

xdm.initd.diff can be applied to https://github.com/gentoo/gentoo
Comment 1 Matt Turner gentoo-dev 2019-07-16 06:49:08 UTC
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.
Comment 2 anonymous 2019-07-16 07:22:07 UTC
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.
Comment 3 anonymous 2019-07-16 07:24:09 UTC
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.
Comment 4 anonymous 2019-07-17 23:01:01 UTC
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.
Comment 5 Matt Turner gentoo-dev 2019-07-17 23:29:43 UTC
(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?
Comment 6 anonymous 2019-07-18 06:55:54 UTC
"xdm: no matching processes found" is shown on a tty during shutdown.

Do you not see a tty during shutdown?
Comment 7 Matt Turner gentoo-dev 2019-07-18 07:02:25 UTC
(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.
Comment 8 anonymous 2019-07-20 02:28:23 UTC
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.
Comment 9 anonymous 2019-07-29 23:35:25 UTC
I tested the patch for days. It works pretty well.
Comment 10 Larry the Git Cow gentoo-dev 2019-07-30 01:49:55 UTC
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(-)
Comment 11 tt_1 2019-07-30 04:44:35 UTC
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.