[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#270393: xdm.pid not checked properly



retitle 270393 xdm: init script does not properly check pid in /var/run/xdm.pid
tag 270393 + unreproducible moreinfo
thanks

On Tue, Sep 07, 2004 at 09:38:46AM +0200, Christian Schlittchen wrote:
> Package: xdm
> Version: 4.3.0.dfsg.1-7
> Severity: normal
> 
> xdm does not properly check the pid in /var/run/xdm.pid, failing to
> start with 'already running' even if no process with that pid is
> currently running.
> 
> This bug has been around for several years now.

Works for me:

$ ps -C xdm
  PID TTY          TIME CMD
30210 ?        00:00:00 xdm
30214 ?        00:00:00 xdm
$ cat /var/run/xdm.pid
30210
$ sudo sh -x /etc/init.d/xdm start
+ set -e
+ HEED_DEFAULT_DISPLAY_MANAGER=true
+ DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ DAEMON=/usr/bin/X11/xdm
+ PIDFILE=/var/run/xdm.pid
+ UPGRADEFILE=/var/run/xdm.daemon-not-stopped
+ test -x /usr/bin/X11/xdm
+ '[' -e /var/run/xdm.daemon-not-stopped ']'
+ SSD_START_ARGS=--pidfile /var/run/xdm.pid --startas /usr/bin/X11/xdm
+ SSD_STOP_ARGS=--pidfile /var/run/xdm.pid --name usr/bin/X11/xdm
+ '[' -e /etc/X11/default-display-manager ']'
+ '[' true = true ']'
++ cat /etc/X11/default-display-manager
+ '[' /usr/bin/X11/xdm '!=' /usr/bin/X11/xdm ']'
+ echo -n 'Starting X display manager: xdm'
Starting X display manager: xdm+ start-stop-daemon --start --quiet --pidfile /var/run/xdm.pid --startas /usr/bin/X11/xdm
+ echo -n ' already running'
 already running+ echo .
.
+ exit 0

What, specifically, do you posit is wrong with the existing code?

If there is something amiss, it may be in start-stop-daemon -- that is the
tool that is checking the pid file.

$ dlocate -S start-stop-daemon
dpkg: /usr/share/man/man8/start-stop-daemon.8.gz
dpkg: /usr/share/man/de/man8/start-stop-daemon.8.gz
dpkg: /usr/share/man/es/man8/start-stop-daemon.8.gz
dpkg: /usr/share/man/fr/man8/start-stop-daemon.8.gz
dpkg: /usr/share/man/ja/man8/start-stop-daemon.8.gz
dpkg: /usr/share/man/ru/man8/start-stop-daemon.8.gz
dpkg: /usr/share/man/sv/man8/start-stop-daemon.8.gz
dpkg: /sbin/start-stop-daemon

-- 
G. Branden Robinson                |    If I recall correctly, devfs went
Debian GNU/Linux                   |    straight from being marked as
branden@debian.org                 |    EXPERIMENTAL to OBSOLETE in the
http://people.debian.org/~branden/ |    kernel config.     -- Tore Anderson

Attachment: signature.asc
Description: Digital signature


Reply to: