Another minor change, but this should almost get us to the point that we
[lyx.git] / development / keystest / list_all_children.sh
blob11359aed6436aa38585db3e4594d6f25c1cfc20c
1 #!/bin/bash
3 listall () {
4 PID_LIST="$*"
5 while [ ! -z "$PID_LIST" ]
6 do
7 #PID_LIST=`ps -o pid= --ppid "$PID_LIST"| sed 's/^ *//g'`
8 PID_LIST=`ps -o pid= --ppid "$PID_LIST"`
9 PID_LIST=`echo $PID_LIST`
10 #PID_LIST=`ps -o pid= --ppid "$PID_LIST"`
11 echo $PID_LIST
12 done
15 kill_all_children () {
16 kill `listall "$*"`
17 sleep 0.1
18 kill -9 `listall "$*"`
21 if [ "$1"="$kill" ]
22 then
23 shift
24 kill_all_children "$*"
25 else
26 listall "$*"