devtools/data/xvfb-run.sh
branchstable
changeset 8758 3a0d91237e2c
parent 8339 63348ead09fb
child 8884 e750e5abd1c7
--- a/devtools/data/xvfb-run.sh	Thu Mar 21 16:37:06 2013 +0100
+++ b/devtools/data/xvfb-run.sh	Thu Mar 21 16:52:13 2013 +0100
@@ -140,7 +140,7 @@
 fi
 
 # tidy up after ourselves
-trap clean_up EXIT
+trap clean_up EXIT TERM
 
 # If the user did not specify an X authorization file to use, set up a temporary
 # directory to house one.
@@ -178,13 +178,8 @@
     exit 1
 done
 
-# Start the command and save its exit status.
-set +e
-DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
-RETVAL=$?
-set -e
-
-# Return the executed command's exit status.
-exit $RETVAL
+# Start the command
+DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 &
+wait $!
 
 # vim:set ai et sts=4 sw=4 tw=80: