Project

General

Profile

« Previous | Next » 

Revision 7262

waitpid, lockfile: Changed $interval default to 5s to work with smaller imports, where less waiting is needed

View differences:

waitpid
2 2
# Waits for process(es), which don't need to be owned by the current shell.
3 3
# Usage: env [interval=...] self PID...
4 4

  
5
: "${interval=60}" # s
5
: "${interval=5}" # s
6 6

  
7 7
for pid in "$@"; do
8 8
    while test -n "$(ps -p "$pid" -o pid=)"; do sleep "$interval"; done

Also available in: Unified diff