from bash, I'd like to kick off a new process in a new terminal, wait till it finishes, and then recover the exit code.
for example, I'd like to do something like this, but actually recover the useful exit codes;
gnome-terminal -e "bash -c \" sleep 2s ; if [ '1' == '1' ] ; then exit 2 ; else exit 3 ; fi \""
echo gnome terminal returns $?
#gnome terminal returns 0
anyone know how?