make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / user-tools / waitpid
blobe3c5437137c0e9ec6e1b936ae7aa053b69280f9c
1 #!/bin/bash
3 true <<EOF
4 =pod
6 =head1 NAME
8 waitpid - Wait for a process to end (even if not child of current shell)
10 =cut
12 EOF
15 if [ "$1" -gt 0 ] 2>/dev/null
16 then
17 pid=$1
18 while [ -d /proc/$pid ]
20 sleep 0.5
21 done
22 exit 0
23 else
24 echo "Usage: $0 [PID]" >&2
25 exit 1