add proper error handling for all final exec calls
[hband-tools.git] / user-tools / straceall
blobd789a5f8ae08ba8de8d84d997387706466feb4dc
1 #!/bin/bash
3 name=$1
4 shift
5 if [ ".${name:0:1}" = .- ]
6 then
7 echo "Usage: straceall <process name> [strace options]" >&2
8 exit 1
9 fi
10 exec strace "$@" $(for pid in $(pgrep -x "$name"); do echo -p $pid; done)