aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <somasis@exherbo.org>2016-07-25 03:32:12 -0400
committerKylie McClain <somasis@exherbo.org>2016-07-25 03:32:29 -0400
commit9742fcc0f6388b369ee3a55e0b59cc430902f3a8 (patch)
tree15423b0ab1ca5c81d9c4d1afcc9225cb9a23d84c
parent13df13f3fb63027b935527bf25bc821d3cfef310 (diff)
downloads6-exherbo-9742fcc0f6388b369ee3a55e0b59cc430902f3a8.tar.gz
s6-exherbo-9742fcc0f6388b369ee3a55e0b59cc430902f3a8.tar.xz
s6-exherbo-9742fcc0f6388b369ee3a55e0b59cc430902f3a8.zip
init3: use `kill -1` rather than `pgrep`
-rwxr-xr-xlibexec/s6/init3.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/libexec/s6/init3.sh b/libexec/s6/init3.sh
index 781f8a2..2bda58b 100755
--- a/libexec/s6/init3.sh
+++ b/libexec/s6/init3.sh
@@ -3,16 +3,12 @@
TERM=linux clear
echo "Sending TERM to all processes..."
-for p in $(pgrep . | grep -Ev "^(1|$$|$PPID)"); do
- kill "$p" >/dev/null 2>&1
-done
+kill -TERM -1
sleep 1
echo "Sending KILL to all processes..." }
-for p in $(pgrep . | grep -Ev "^(1|$$|$PPID)"); do
- kill -9 "$p" >/dev/null 2>&1
-done
+kill -KILL -1
echo "Syncing disks..."
sync