Репозитории ALT
5.1: | 2.86-alt2 |
4.1: | 2.86-alt2 |
4.0: | 2.86-alt1 |
3.0: | 2.85-alt8 |
Группа :: Система/Настройка/Загрузка и инициализация
Пакет: SysVinit
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: sysvinit-2.86-deb-killall-avoid-init.patch
Скачать
Скачать
#! /bin/sh /usr/share/dpatch/dpatch-run
## 81_killall_avoid_init.dpatch by Petter Reinholdtsen
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Make sure we do not try to kill init (pid 1) by mistake. Patch
## DP: from SuSe.
@DPATCH@
Index: sysvinit/src/killall5.c
===================================================================
--- sysvinit/src/killall5.c (revisjon 64)
+++ sysvinit/src/killall5.c (arbeidskopi)
@@ -605,11 +605,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. */