summaryrefslogtreecommitdiff
path: root/tests/zstop.sh
blob: 69e574cb4603a99ed70a48da3bb82aa7173b202b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /bin/sh

#. ../env.sh

for p in pid/*.pid*; do
  test -f "$p" || continue
  pid=`cat "$p"`
  test -d "/proc/$pid" || {
    rm -f "$p"
    continue
  }
  kill "$pid"
done