Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 277043 Details for
Bug 371625
sys-apps/openrc: omit some processes in killprocs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add support for omitting some proccesses in killproc
0002-Add-support-for-omitting-some-proccesses-in-killproc.patch (text/plain), 1.65 KB, created by
Kirill Elagin
on 2011-06-14 14:24:37 UTC
(
hide
)
Description:
Add support for omitting some proccesses in killproc
Filename:
MIME Type:
Creator:
Kirill Elagin
Created:
2011-06-14 14:24:37 UTC
Size:
1.65 KB
patch
obsolete
>From 4e93b97e45ed8eafa5f9c40f834fc1398bfafa27 Mon Sep 17 00:00:00 2001 >From: Nikita Ofitserov <himikof@gmail.com> >Date: Sat, 11 Jun 2011 16:16:53 +0400 >Subject: [PATCH 2/3] Add support for omitting some proccesses in killprocs > >--- > conf.d/Makefile | 2 +- > conf.d/killprocs | 4 ++++ > init.d/killprocs.in | 12 ++++++++++-- > 3 files changed, 15 insertions(+), 3 deletions(-) > create mode 100644 conf.d/killprocs > >diff --git a/conf.d/Makefile b/conf.d/Makefile >index 374bfdb..77b4529 100644 >--- a/conf.d/Makefile >+++ b/conf.d/Makefile >@@ -1,5 +1,5 @@ > DIR= ${CONFDIR} >-CONF= bootmisc fsck hostname localmount network staticroute urandom >+CONF= bootmisc fsck hostname killprocs localmount network staticroute urandom > > TARGETS+= network staticroute > CLEANFILES+= network staticroute >diff --git a/conf.d/killprocs b/conf.d/killprocs >new file mode 100644 >index 0000000..e901942 >--- /dev/null >+++ b/conf.d/killprocs >@@ -0,0 +1,4 @@ >+# This variable contains a space-delimited list of PIDs which will >+# not be killed by the killprocs initscript >+ >+# DONTKILL_PIDS="42 566" >diff --git a/init.d/killprocs.in b/init.d/killprocs.in >index 7132e9e..6a43c1d 100644 >--- a/init.d/killprocs.in >+++ b/init.d/killprocs.in >@@ -12,11 +12,19 @@ depend() > start() > { > ebegin "Terminating remaining processes" >- killall5 -15 >+ local dontkill >+ if [ -n "${DONTKILL_PIDS}" ]; then >+ for pid in ${DONTKILL_PIDS}; do >+ dontkill=${dontkill},$pid >+ done >+ dontkill=${dontkill#,} >+ [ -n "${dontkill}" ] && dontkill="-o ${dontkill}" >+ fi >+ killall5 -15 ${dontkill} > sleep 1 > eend 0 > ebegin "Killing remaining processes" >- killall5 -9 >+ killall5 -9 ${dontkill} > sleep 1 > eend 0 > } >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 371625
:
277043