OpenSDE Packages Database (without history before r20070)
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

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