silence skipped clean-up inside the container (#2608)
This commit is contained in:
@@ -73,7 +73,7 @@ function kill_with_kids() {
|
|||||||
# kill a process and all its children (by pid)! return no error.
|
# kill a process and all its children (by pid)! return no error.
|
||||||
|
|
||||||
if [[ -n $1 ]]; then
|
if [[ -n $1 ]]; then
|
||||||
mapfile -t CHILDREN_PID_LIST < <(ps --ppid "$1" -o pid= || true)
|
mapfile -t CHILDREN_PID_LIST < <(ps --ppid "$1" -o pid= &>/dev/null || true)
|
||||||
for child_pid in "${CHILDREN_PID_LIST[@]}"; do
|
for child_pid in "${CHILDREN_PID_LIST[@]}"; do
|
||||||
kill "$child_pid" &>/dev/null || true
|
kill "$child_pid" &>/dev/null || true
|
||||||
wait "$child_pid" &>/dev/null || true
|
wait "$child_pid" &>/dev/null || true
|
||||||
|
|||||||
Reference in New Issue
Block a user