6e7eaf3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh ROOT_PID=$1 SIGNAL=$2 terminateTree() { for cpid in $(/usr/bin/pgrep -P $1); do terminateTree $cpid done kill -$SIGNAL $1 > /dev/null 2>&1 } terminateTree $ROOT_PID