LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   xdm init script problem - /var/run/xdm.pid is gone ? (http://www.linuxquestions.org/questions/debian-26/xdm-init-script-problem-var-run-xdm-pid-is-gone-832068/)

Vilius 09-14-2010 06:47 AM

xdm init script problem - /var/run/xdm.pid is gone ?
 
Hello,

Running Debian lenny 64bit.
I start xdm:
Code:

# /etc/init.d/xdm start
Starting X display manager: xdm.
#

Process is started and xdm.pid is in place:
Code:

# ps -ef|grep xdm
root      3917    1  0 11:30 ?        00:00:00 /usr/bin/xdm
#
# ls /var/run|grep xdm
xdm.pid
#

Now I log in using xdm login dialog and log out. Lets check xdm:
Code:

# ps -ef|grep xdm
root      3917    1  0 11:30 ?        00:00:00 /usr/bin/xdm
#
# ls /var/run|grep xdm
#

xdm.pid is gone and if I try to stop xdm:
Code:

# /etc/init.d/xdm stop
Stopping X display manager: xdm not running (/var/run/xdm.pid not found).
#

Of course I can kill xdm but this is annoying. If I use invoke-rc.d - result is exactly the same.

Why xdm.pid is deleted while xdm continues to run ?
Possible to fix that ?

thanks
Vilius

unSpawn 09-15-2010 04:57 PM

Quote:

Originally Posted by Vilius (Post 4096999)
Why xdm.pid is deleted while xdm continues to run ?

"xdm does not properly check the pid in /var/run/xdm.pid" (2004): http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=270393 ("Severity set to wishlist")?


Quote:

Originally Posted by Vilius (Post 4096999)
Possible to fix that ?

Wedging in a rather crude 'pgrep /usr/bin/xdm > /var/run/xdm.pid' at the top of the "stop" section could work as long as only one PID exists or the kill function will deal with killing multiple PIDs?

Vilius 09-16-2010 03:06 AM

Ok added this:
Code:

pgrep -f -n /usr/bin/xdm > /dev/null && pgrep -f -n /usr/bin/xdm > /var/run/xdm.pid
Works.
Thanks for idea.

Vilius


All times are GMT -5. The time now is 04:00 PM.