mirror of
https://github.com/namecoin/ncdns-repro
synced 2024-11-16 12:12:44 +00:00
15 lines
264 B
Bash
Executable File
15 lines
264 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# https://unix.stackexchange.com/a/299198
|
|
descendent_pids() {
|
|
pids=$(pgrep -P $1)
|
|
echo $pids
|
|
for pid in $pids; do
|
|
descendent_pids $pid
|
|
done
|
|
}
|
|
|
|
build_pid=$(pgrep -f '\./build')
|
|
echo $build_pid
|
|
descendent_pids $build_pid
|