Thursday, September 6, 2007

wait for process to end

If the process is a child of the current shell:
wait $pid

Otherwise:
while kill -0 $pid > /dev/null; do sleep 1; done

No comments: