# HG changeset patch # User Julien Cristau # Date 1363881133 -3600 # Node ID 3a0d91237e2c5c4f925ae31d490efcb8d0266a45 # Parent 375acf527559800c137efb640d3cc238d2a0f0ef [devtools] fix a couple issues with xvfb-run xvfb-run didn't quite clean up correctly after itself, because: - dash doesn't run EXIT traps on signals - if we don't run the command in the background, a TERM handler doesn't run until the command exits diff -r 375acf527559 -r 3a0d91237e2c devtools/data/xvfb-run.sh --- 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: