~ubuntu-branches/debian/experimental/sysvinit/experimental

« back to all changes in this revision

Viewing changes to debian/patches/81_killall_avoid_init.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Petter Reinholdtsen
  • Date: 2008-08-12 16:07:50 UTC
  • Revision ID: james.westby@ubuntu.com-20080812160750-65gpyv74vh4qr69w
Tags: 2.86.ds1-61
* Fix typo in rcS(5), proberly->properly (Closes: #484233).  Thanks to
  Julien Danjou for noticing.
* Fix typo in rcS(5), maually->manually (Closes: #493680).  Thanks to
  Xr for noticing.
* Modify runlevel detection code in invoke-rc.d to notice the
  difference between runlevels 0 and 6, and the boot runlevel, to
  make it possible to use invoke-rc.d during boot (Closes: 384509).
* Make sure to call restorecon after mounting tmpfs file systems, to
  set SELinux permissions (Closes: #493679).  Patch from Russell
  Coker.
* Move responsibility of stopping the splash screen process from
  individual init.d scripts to init.d/rc.  This make sure the
  progress calculation reflect reality, and that the splash screen
  is taken down in runlevel 1 (Closes: #431560) and that it stop
  before gdm and kdm (Closes: #422922, #489734).
* Skip error message from checkfs.sh when / is read-only.  Patch
  from Mirek Slugen (Closes: #492214).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 81_killall_avoid_init.dpatch by Petter Reinholdtsen
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Make sure we do not try to kill init (pid 1) by mistake.  Patch
 
6
## DP: from SuSe.
 
7
 
 
8
@DPATCH@
 
9
diff -urNad trunk~/src/killall5.c trunk/src/killall5.c
 
10
--- trunk~/src/killall5.c       2008-03-26 09:31:20.000000000 +0100
 
11
+++ trunk/src/killall5.c        2008-03-26 09:31:20.000000000 +0100
 
12
@@ -633,11 +633,11 @@
 
13
                exit(1);
 
14
        }
 
15
 
 
16
-       /* Now kill all processes except our session. */
 
17
+       /* Now kill all processes except init (pid 1) and our session. */
 
18
        sid = (int)getsid(0);
 
19
        pid = (int)getpid();
 
20
        for (p = plist; p; p = p->next)
 
21
-               if (p->pid != pid && p->sid != sid && !p->kernel)
 
22
+               if (p->pid != 1 && p->pid != pid && p->sid != sid && !p->kernel)
 
23
                        kill(p->pid, sig);
 
24
 
 
25
        /* And let them continue. */