1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 81_killall_avoid_init.dpatch by Petter Reinholdtsen
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
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
16
- /* Now kill all processes except our session. */
17
+ /* Now kill all processes except init (pid 1) and our session. */
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)
25
/* And let them continue. */