Revision 7256
Added by Aaron Marcuse-Kubitza almost 12 years ago
bin/waitpid | ||
---|---|---|
5 | 5 |
: "${interval=60}" # s |
6 | 6 |
|
7 | 7 |
for pid in "$@"; do |
8 |
while test -e "/proc/$pid"; do sleep "$interval"; done
|
|
8 |
while test -n "$(ps -p "$pid" -o pid=)"; do sleep "$interval"; done
|
|
9 | 9 |
done |
Also available in: Unified diff
waitpid: Use `ps` instead of /proc to also work on Mac