#!/bin/sh #author: Chris Sincock #This software is provided as-is and is not guaranteed to be free of defects. Use it only at your own risk. prog="$1"; shift; exec "$prog" "$@" & ret=$? err=$! if [ ! -z "$err" ] ; then #echo fucking exec of $prog failed, returning: "$ret (error:$err)" #exit $ret #!="$err" exit -1 fi exit $ret