fix kt function
This commit is contained in:
@@ -80,12 +80,12 @@ kt()
|
|||||||
{
|
{
|
||||||
[[ -z $1 ]] && echo -e "Usage:\n\tkt <pid> [kill_options]"
|
[[ -z $1 ]] && echo -e "Usage:\n\tkt <pid> [kill_options]"
|
||||||
|
|
||||||
local parent_pid="$1" children_pids
|
local parent_pid="$1"
|
||||||
shift
|
shift
|
||||||
children_pids=$(pgrep -P "$parent_pid")
|
children_pids=$(pgrep -P "$parent_pid")
|
||||||
|
|
||||||
for pid in $children_pids; do
|
for pid in $children_pids; do
|
||||||
kill_tree "$pid" "$@"
|
kt "$pid" "$@"
|
||||||
done
|
done
|
||||||
kill "$@" "$parent_pid"
|
kill "$@" "$parent_pid"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user