In Unix, if all is well after a cmd, $? is usually set to zero, so the std test is:
Code:
rslt=`cmd`
if [[ $? -ne 0 ]]
then
error occurred, send msg etc
fi
where cmd is the other prog. If it doesn't handle its own stdout/stderr, you can redirect those here or capture them for debug.