You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.6 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../runit-shutdown/killall5_hotfix.patch
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- runit-shutdown-0.2/src/killall5.sh.orig 2006-04-08 23:48:04.000000000 +0200
+++ runit-shutdown-0.2/src/killall5.sh 2006-04-09 00:13:51.000000000 +0200
@@ -35,13 +35,13 @@
fi
# pid (comm) state ppid pgrp session tty_nr tpgid flags ...
- eval `sed -e 's,^\([0-9]*\) ([^)]*) . \([0-9]*\) \([0-9]*\) \([0-9]*\) .*,my_pid=\1 my_ppid=\2 my_pgrp=\3 my_session=\4,g' \
+ eval `sed -n -e 's,^\([0-9]*\) ([^)]*) . \([0-9]*\) \([0-9]*\) \([0-9]*\) .*,my_pid=\1 my_ppid=\2 my_pgrp=\3 my_session=\4,p' \
/proc/$$/stat | tr ' ' '\n'`
# who am i?
#echo -e "$my_pid\t$my_ppid\t$my_pgrp\t$my_session\tMYSELF"
- sed -e 's,^\([0-9]*\) ([^)]*) . \([0-9]*\) \([0-9]*\) \([0-9]*\) .*,\1 \2 \3 \4,g' \
+ sed -n -e 's,^\([0-9]*\) ([^)]*) . \([0-9]*\) \([0-9]*\) \([0-9]*\) .*,\1 \2 \3 \4,p' \
`ls -d1 /proc/*/stat` 2> /dev/null | while read proc_pid proc_ppid proc_pgrp proc_session; do
case "$proc_session" in
0|1|$my_session) action='' ;;