aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergely Risko <gergely+context@risko.hu>2009-06-22 08:36:31 +0300
committerGergely Risko <gergely+context@risko.hu>2009-06-22 08:36:31 +0300
commit3a1f2a760095c671f546e8af812627a4acfd9322 (patch)
tree225c0bde7cca6f6a811156169df73648fe85dc98
parenta97a1ad1cd513ee884a0cda95a396deaf97a2395 (diff)
POSIXified rec-kill.sh.
Signed-off-by: Jean-Luc Lamadon <jean-luc.lamadon@nokia.com>
-rwxr-xr-xlibcontextsubscriber/customer-tests/common/rec-kill.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcontextsubscriber/customer-tests/common/rec-kill.sh b/libcontextsubscriber/customer-tests/common/rec-kill.sh
index 621a0f13..8ec5c4a9 100755
--- a/libcontextsubscriber/customer-tests/common/rec-kill.sh
+++ b/libcontextsubscriber/customer-tests/common/rec-kill.sh
@@ -1,16 +1,16 @@
-#!/bin/bash
+#!/bin/sh
dokill() {
- for cpid in $(ps -o pid= --ppid $1)
+ for cpid in `ps -o pid= --ppid $1`
do
dokill $cpid
done
- #echo "killing: $(ps -p $1 -o cmd=)"
kill -9 $1 > /dev/null 2>&1
}
-if [[ $# == 0 ]]; then
- echo "usage: $(basename $0) <top pid to kill>"
+if test $# = 0
+then
+ echo "usage: $0 <top pid to kill>"
exit 1
fi