blob: ddccd9032279efac0ace6158a4bea8b40ecbe627 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
list_descendants ()
{
local children=$(ps -o pid= --ppid "$1")
for pid in $children
do
list_descendants "$pid"
done
echo $children
}
kill $(list_descendants $(pidof -x run_stm32_tst))
|