Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 210829 - prefdm hang when running kdm with nodaemon
prefdm hang when running kdm with nodaemon
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2006-10-15 19:12 EDT by Yan Morin
Modified: 2014-03-16 23:03 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-18 15:34:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Yan Morin 2006-10-15 19:12:43 EDT
Description of problem:
Infinite /etc/X11/prefdm loop running

How reproducible:

Steps to Reproduce:
1. Boot with initlevel 3
2. log in as root
3. add DISPLAYMANAGER=KDE to /etc/sysconfig/desktop
(echo "DISPLAYMANAGER=KDE" >> /etc/sysconfig/desktop)
4. run /etc/X11/prefdm
Actual results:
infinite loop

Expected results:
no infinite loop

Additional info:
Code in /etc/X11/prefdm
if [ -n "$preferred" ]; then
        $preferred "$@" >/dev/null 2>&1
        if [ $? -ne 127 ]; then
               exec $0 "$@"
               exit $?
        exit $?

If you look, it execute kdm with prefdm argument ($@).
Then it takes the return, and exec again prefdm if the result is not 127.

The problem is that when you don't send -nodaemon to kdm inside a bash shell
(the bash shell don't have a pid of 1), kdm return immediatly the number 0 in
daemon mode.
See kdm source code, function main():

kdm could also return the number 1 if their is a xdm already running.
Comment 1 Bill Nottingham 2006-10-16 11:48:55 EDT
Does this still happen in FC5 or the FC6 development tree?
Comment 2 Yan Morin 2006-10-23 10:30:30 EDT
Still happen in FC5. (it's the same prefdm script for this part)
Comment 3 Bill Nottingham 2006-10-23 14:25:05 EDT
I don't see this in testing - I set the display manager to kdm, and it runs fine.

Is there anything else unusual in your setup?
Comment 4 Yan Morin 2006-11-10 16:05:24 EST
Same problem on a fresh and clean install of FC6.

If you want to see the loop, try some 
ps ax
ps ax
ps ax
ps ax
And see the kdm/gdm process number that are changing...

or display an echo "in prefdm" at the beginning of the script
Comment 5 Bill Nottingham 2006-11-10 16:27:20 EST
Oh, after re-reading I understand.

Why are you running prefdm without -nodaemon by hand?
Comment 6 Yan Morin 2006-11-11 09:53:18 EST
I want to try the script, like when it starting normally. (Check what is the
default desktop manager used, what will be the result.)

Is there a documentation where the -nodaemon is specified and obligatory? 
in prefdm --help ?   man prefdm?
Comment 7 Bill Nottingham 2006-11-13 22:36:19 EST
It's not documented as such, but it's more or less expected that that's how it
will be invoked.
Comment 8 Christian Iseli 2007-01-22 05:44:20 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Comment 9 Bill Nottingham 2007-09-18 15:34:20 EDT
Closing; this is expected behavior.

Note You need to log in before you can comment on or make changes to this bug.