Red Hat Bugzilla – Bug 432870
telinit 3 does not shut down X
Last modified: 2014-06-18 04:46:09 EDT
Description of problem:
Version-Release number of selected component (if applicable):
Subject Says It All :)
This one is slightly interesting, are you running X from an event.d script?
Could you attach that if you are.
# prefdm - preferred display manager
# Starts gdm/xdm/etc by preference
start on stopped rc5
stop on runlevel [!5]
Does "stop prefdm" stop X?
Well, it never returns. So it could be 'failing to stop it correctly.'
Could you paste the output from that?
Mine does return. I just get a "stop: Job not changed: prefdm"
does prefdm stay in the foreground while X is running or does it go into the
prefdm execs whatever the configured display manager is.
As for the hang I was seeing, SELinux is preventing it from working; without
SELinux I see the 'job not changed' that Casey does.
I have a quick solution to this. Edit /etc/X11/prefdm and anywhere it runs
/usr/sbin/gdm add the --no-daemon parameter. Haven't tested this issue with
gdm itself forks automatically, that's where the issue lies. Scott has a
somewhat controversial but ultimately effective way of getting around forking
daemons via ptrace (It will be interesting to see how it fares given that gdm
forks the holy hell out of itself). It may be worth trying to get in early.
There may also be a more upstarty way of replacing prefdm entirely with an event.
KDM accepts a -nodaemon switch, it also accepts --nodaemon, but
not --no-daemon. I don't think ptrace hackery is a good idea.
That's more upstream's decision. I do think its probably the only available
solution to the fork issue long term, and its done in a fairly benign way, so I
intend to support them in it. If we set up daemons that don't fork, then it
won't affect us at all.
Whooops, this is simpler than we made it out to be.
The old inittab event is:
Ergo, the upstart event should be -nodaemon as well - this should just be
changed in the upstart event, not /etc/X11/prefdm.
Package building now. Closed.