mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 20:32:49 +00:00
8a7b05f57c
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg154502.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31495 a592a061-630c-0410-9148-cb99ea01b6c8
28 lines
433 B
Bash
Executable File
28 lines
433 B
Bash
Executable File
#!/bin/bash
|
|
|
|
listall () {
|
|
PID_LIST="$*"
|
|
while [ ! -z "$PID_LIST" ]
|
|
do
|
|
#PID_LIST=`ps -o pid= --ppid "$PID_LIST"| sed 's/^ *//g'`
|
|
PID_LIST=`ps -o pid= --ppid "$PID_LIST"`
|
|
PID_LIST=`echo $PID_LIST`
|
|
#PID_LIST=`ps -o pid= --ppid "$PID_LIST"`
|
|
echo $PID_LIST
|
|
done
|
|
}
|
|
|
|
kill_all_children () {
|
|
kill `listall "$*"`
|
|
sleep 0.1
|
|
kill -9 `listall "$*"`
|
|
}
|
|
|
|
if [ "$1"="$kill" ]
|
|
then
|
|
shift
|
|
kill_all_children "$*"
|
|
else
|
|
listall "$*"
|
|
fi
|