1 #!/bin/sh 2 3 case "$#" in 4 0) echo "usage: mpr a.out [arg ...]" >&2 5 exit 1;; 6 *) aout=`mprwhich "$1"` || exit 1 7 shift;; 8 esac 9 10 MPRSO=`mprso "$aout"` || exit 1 11 eval "$MPRSO" 12 13 case "$MPRLD_PRELOAD" in 14 ?*) LD_PRELOAD="$MPRLD_PRELOAD${LD_PRELOAD:+:}$LD_PRELOAD" 15 export LD_PRELOAD;; 16 esac 17 18 MPRFI=${MPRFI-"gzip -1>log.%p.gz"}; export MPRFI 19 20 exec "$aout" "$@" 21 echo mpr: error: could not exec "$aout" "$@" >&2 22 exit 1