diff options
author | Gergely Risko <gergely+context@risko.hu> | 2009-06-22 08:36:31 +0300 |
---|---|---|
committer | Gergely Risko <gergely+context@risko.hu> | 2009-06-22 08:36:31 +0300 |
commit | 3a1f2a760095c671f546e8af812627a4acfd9322 (patch) | |
tree | 225c0bde7cca6f6a811156169df73648fe85dc98 | |
parent | a97a1ad1cd513ee884a0cda95a396deaf97a2395 (diff) |
POSIXified rec-kill.sh.
Signed-off-by: Jean-Luc Lamadon <jean-luc.lamadon@nokia.com>
-rwxr-xr-x | libcontextsubscriber/customer-tests/common/rec-kill.sh | 10 |
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 |