Package: thttpd
Severity: wishlist
Tags: patch

If thttpd dies unexpectedly (and this is something that happens too often),
/etc/init.d/thttpd stop|restart will fail, the pidfile will stay, and it will
be impossible to restart the daemon unless the pidfile is removed.

This patch makes it tolerant to kill(1) failure.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-amd64-k8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
diff -ur thttpd-2.23beta1.old/debian/thttpd.rc thttpd-2.23beta1/debian/thttpd.rc
--- thttpd-2.23beta1.old/debian/thttpd.rc       2006-08-26 13:34:59.000000000 
+0200
+++ thttpd-2.23beta1/debian/thttpd.rc   2006-08-26 13:36:11.000000000 +0200
@@ -32,7 +32,7 @@
     stop)
         echo -n "Stopping web server: "
         if [ -f $PIDFILE ]; then
-            kill -10 `cat $PIDFILE`
+            kill -10 `cat $PIDFILE` || true
             echo "$NAME"
             rm -f $PIDFILE
         else

Reply via email to