Package: initscripts
Version: 2.86.ds1-47
Severity: wishlist
Tags: patch

Hi,

Please consider applying attached patch to allow sendsigs to read multpile
pidfiles from /lib/init/rw/sendsigs.omit.d/.

/var/run/sendsigs.omit could be prone to file access race conditions. It is
also more problematic to remove pids from /var/run/sendsigs.omit in cases
where that is required.

Thanks, Kel.
---
Index: debian/initscripts/etc/init.d/sendsigs
===================================================================
--- debian/initscripts/etc/init.d/sendsigs      (revision 1191)
+++ debian/initscripts/etc/init.d/sendsigs      (working copy)
@@ -22,6 +22,15 @@
                done
        fi
 
+       if [ -d /lib/init/rw/sendsigs.omit.d/ ]; then
+               for pidfile in /lib/init/rw/sendsigs.omit.d/*; do
+                       [ -f "$pidfile" ] || continue
+                       for pid in $(cat $pidfile); do
+                               OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
+                       done
+               done
+       fi
+
        # Flush the kernel I/O buffer before we start to kill
        # processes, to make sure the IO of alrady stopped services to
        # not slow down the remaining processes to a point where they
Index: debian/initscripts/etc/init.d/mountkernfs.sh
===================================================================
--- debian/initscripts/etc/init.d/mountkernfs.sh        (revision 1191)
+++ debian/initscripts/etc/init.d/mountkernfs.sh        (working copy)
@@ -28,6 +28,9 @@
        [ "${RW_SIZE:=$TMPFS_SIZE}" ] && RW_OPT=",size=$RW_SIZE"
        domount tmpfs "" /lib/init/rw tmpfs -omode=0755,nosuid$RW_OPT
        touch /lib/init/rw/.ramfs
+       
+       # Make pidfile omit directory for sendsigs
+       mkdir /lib/init/rw/sendsigs.omit.d/
 
        #
        # Mount proc filesystem on /proc



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to