make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / user-tools / withpidfile
blob6f3e6986f0d18382e09438a9675a210180c513b6
1 #!/bin/sh
3 if [ $# -lt 2 ]
4 then
5 echo "Usage: withpidfile <PIDFILE> <COMMAND> [<ARGS>]" >&2
6 exit 1
7 fi
9 set -e
11 echo $$ > "$1"
12 shift
13 exec "$@"