mirror of
https://github.com/kforney/pentest-distro-builder.git
synced 2024-12-01 12:41:59 -07:00
13 lines
175 B
Bash
13 lines
175 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
terminateTree() {
|
||
|
for cpid in $(/usr/bin/pgrep -P $1); do
|
||
|
terminateTree $cpid
|
||
|
done
|
||
|
kill -9 $1 > /dev/null 2>&1
|
||
|
}
|
||
|
|
||
|
for pid in $*; do
|
||
|
terminateTree $pid
|
||
|
done
|