[Pkg-sysvinit-commits] r1446 - in sysvinit-upstream/trunk: doc src
Petter Reinholdtsen
pere at alioth.debian.org
Sun Jul 12 14:39:45 UTC 2009
Author: pere
Date: 2009-07-12 14:39:45 +0000 (Sun, 12 Jul 2009)
New Revision: 1446
Modified:
sysvinit-upstream/trunk/doc/Changelog
sysvinit-upstream/trunk/src/killall5.c
Log:
Change killall to avoid killing init by mistake. Patch from SuSe.
Modified: sysvinit-upstream/trunk/doc/Changelog
===================================================================
--- sysvinit-upstream/trunk/doc/Changelog 2009-07-12 13:30:31 UTC (rev 1445)
+++ sysvinit-upstream/trunk/doc/Changelog 2009-07-12 14:39:45 UTC (rev 1446)
@@ -64,6 +64,7 @@
* Modify wall to use UT_LINESIZE from <utmp.h> instead of hardcoded
string lengths. Patch from SuSe.
* Change wall to make halt include hostname in output.
+ * Change killall to avoid killing init by mistake. Patch from SuSe.
-- Petter Reinholdtsen <pere at debian.org> Fri, 30 Jul 2004 14:14:58 +0200
Modified: sysvinit-upstream/trunk/src/killall5.c
===================================================================
--- sysvinit-upstream/trunk/src/killall5.c 2009-07-12 13:30:31 UTC (rev 1445)
+++ sysvinit-upstream/trunk/src/killall5.c 2009-07-12 14:39:45 UTC (rev 1446)
@@ -659,11 +659,11 @@
exit(1);
}
- /* Now kill all processes except our session. */
+ /* Now kill all processes except init (pid 1) and our session. */
sid = (int)getsid(0);
pid = (int)getpid();
for (p = plist; p; p = p->next)
- if (p->pid != pid && p->sid != sid && !p->kernel)
+ if (p->pid != 1 && p->pid != pid && p->sid != sid && !p->kernel)
kill(p->pid, sig);
/* And let them continue. */
More information about the Pkg-sysvinit-commits
mailing list