[Pkg-sysvinit-devel] Bug#595431: NMU diff for sysvinit 2.88dsf-13.1

Ben Hutchings ben at decadent.org.uk
Sat Jan 1 06:01:44 UTC 2011


Note that this changes the behaviour only for non-interactive init
scripts, not for all init scripts in a parallel boot.  The current
behaviour of startpar when running interactive init scripts is correct
and it is a bug in initscripts that interrupting a periodic fsck is
treated as failure.  I have opened a separate bug (#608534) to cover
that (it's not possible to clone merged bugs).

Ben.

diff -u sysvinit-2.88dsf/debian/changelog sysvinit-2.88dsf/debian/changelog
--- sysvinit-2.88dsf/debian/changelog
+++ sysvinit-2.88dsf/debian/changelog
@@ -1,3 +1,10 @@
+sysvinit (2.88dsf-13.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Disable SIGINT for non-interactive init scripts (Closes: #582442)
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Sat, 01 Jan 2011 03:45:28 +0000
+
 sysvinit (2.88dsf-13) unstable; urgency=low
 
   [ Kel Modderman ]
diff -u sysvinit-2.88dsf/debian/startpar/patches/series sysvinit-2.88dsf/debian/startpar/patches/series
--- sysvinit-2.88dsf/debian/startpar/patches/series
+++ sysvinit-2.88dsf/debian/startpar/patches/series
@@ -9,0 +10 @@
+09_noninteractive_ignore_sigint.patch
only in patch2:
unchanged:
--- sysvinit-2.88dsf.orig/debian/startpar/patches/09_noninteractive_ignore_sigint.patch
+++ sysvinit-2.88dsf/debian/startpar/patches/09_noninteractive_ignore_sigint.patch
@@ -0,0 +1,30 @@
+--- a/startpar.c
++++ b/startpar.c
+@@ -397,7 +397,6 @@
+   if (p->pid != 0)
+     return;
+ 
+-  (void)signal(SIGINT,  SIG_DFL);
+   (void)signal(SIGQUIT, SIG_DFL);
+   (void)signal(SIGSEGV, SIG_DFL);
+   (void)signal(SIGTERM, SIG_DFL);
+@@ -511,7 +510,9 @@
+ 
+   if (pid == 0)
+     {
++      /* Interactive init scripts may be interrupted */
+       (void)signal(SIGINT,  SIG_DFL);
++
+       (void)signal(SIGQUIT, SIG_DFL);
+       (void)signal(SIGSEGV, SIG_DFL);
+       (void)signal(SIGTERM, SIG_DFL);
+@@ -700,6 +701,9 @@
+   char *splashopt = 0;
+   int notty = 0;
+ 
++  /* By default, init scripts should not be interruptible */
++  (void)signal(SIGINT,  SIG_IGN);
++
+   (void)signal(SIGUSR1, sighandler_preload);
+   (void)signal(SIGUSR2, sighandler_nopreload);
+ 
--- END ---

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110101/ba77f8d1/attachment-0001.pgp>


More information about the Pkg-sysvinit-devel mailing list