[Pkg-sysvinit-commits] r1905 - in sysvinit/trunk/debian: . src/initscripts/etc/init.d
Petter Reinholdtsen
pere at alioth.debian.org
Tue May 18 06:41:42 UTC 2010
Author: pere
Date: 2010-05-18 06:41:39 +0000 (Tue, 18 May 2010)
New Revision: 1905
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs
Log:
Additional upstart jobs may be /started/ on shutdown after
init.d/sendsigs has first been invoked; so don't assume the list
of known jobs is constant, instead requery initctl before each
killall5 -CONT to properly exclude any new jobs upstart knows
about so that we aren't waiting an extra 10 seconds for no reason.
Patch from Steve Langasek and Ubuntu.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2010-05-16 17:39:53 UTC (rev 1904)
+++ sysvinit/trunk/debian/changelog 2010-05-18 06:41:39 UTC (rev 1905)
@@ -5,6 +5,12 @@
reflect that 'startpar' is no longer a useful value and that
dependency based boot sequencing with parallel boot is the
default.
+ * Additional upstart jobs may be /started/ on shutdown after
+ init.d/sendsigs has first been invoked; so don't assume the list
+ of known jobs is constant, instead requery initctl before each
+ killall5 -CONT to properly exclude any new jobs upstart knows
+ about so that we aren't waiting an extra 10 seconds for no reason.
+ Patch from Steve Langasek and Ubuntu.
-- Petter Reinholdtsen <pere at debian.org> Sun, 16 May 2010 19:38:20 +0200
Modified: sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs
===================================================================
--- sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs 2010-05-16 17:39:53 UTC (rev 1904)
+++ sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs 2010-05-18 06:41:39 UTC (rev 1905)
@@ -76,7 +76,15 @@
# value, because either killall5 work and it make
# sense to wait for processes to die, or it fail and
# there is nothing to wait for.
-
+
+ # did an upstart job start since we last polled initctl? check
+ # again on each loop and add any new jobs (e.g., plymouth) to
+ # the list. If we did miss one starting up, this beats waiting
+ # 10 seconds before shutting down.
+ for pid in $(initctl list | sed -n -e "/process [0-9]/s/.*process //p"); do
+ OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
+ done
+
if killall5 -18 $OMITPIDS ; then
:
else
More information about the Pkg-sysvinit-commits
mailing list