Project

General

Profile

« Previous | Next » 

Revision 7256

waitpid: Use `ps` instead of /proc to also work on Mac

View differences:

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