aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/utils/terminateProcess.sh
blob: 2ec9e1c2ec32949ee319e96df948e0eb50084ed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

terminateTree() {
    for cpid in $(pgrep -P $1); do
        terminateTree $cpid
    done
    kill -9 $1 > /dev/null 2>&1
}

for pid in $*; do
    terminateTree $pid
done