debian/changelog | 8 +++++++- debian/local/xvfb-run | 29 ++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 10 deletions(-)
New commits: commit 5cbab1b34dc2bbc1d54dd3c379fc5cf8262487b3 Author: Brice Goglin <[EMAIL PROTECTED]> Date: Thu Mar 8 20:34:11 2007 +0100 * Apply patch from [EMAIL PROTECTED] to our xvfb-run wrapper to check whether Xvfb started ok and fix its cleanup (closes: #351042). diff --git a/debian/changelog b/debian/changelog index 5da12c9..b2ba574 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ xorg-server (2:1.2.99.901-2) UNRELEASED; urgency=low + [ Drew Parsons ] * Bring xprint back into the xorg fold. - include existing patches: - 91_ttf2pt1 allows Xprint to use ttf2pt1 for Type1 font handling @@ -17,7 +18,12 @@ xorg-server (2:1.2.99.901-2) UNRELEASED; x11proto-print-dev * Run autoreconf to update changes to hw/xprint/ps/Makefile.am. - -- Drew Parsons <[EMAIL PROTECTED]> Sat, 10 Mar 2007 03:18:22 +1100 + [ Brice Goglin ] + * Apply patch from [EMAIL PROTECTED] to our xvfb-run wrapper + to check whether Xvfb started ok and fix its cleanup + (closes: #351042). + + -- Drew Parsons <[EMAIL PROTECTED]> Sat, 10 Mar 2007 23:31:52 +1100 xorg-server (2:1.2.99.901-1) experimental; urgency=low diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run index a5ff11b..5bbd886 100644 --- a/debian/local/xvfb-run +++ b/debian/local/xvfb-run @@ -81,6 +81,19 @@ find_free_servernum() { echo $i } +# Clean up files +clean_up() { + if [ -e "$AUTHFILE" ]; then + XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1 + fi + if [ -n "$XVFB_RUN_TMPDIR" ]; then + if ! rm -r "$XVFB_RUN_TMPDIR"; then + error "problem while cleaning up temporary directory" + exit 5 + fi + fi +} + # Parse the command line. ARGS=$(getopt --options +ae:f:hn:lp:s:w: \ --long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \ @@ -128,6 +141,9 @@ if ! which xauth >/dev/null; then exit 3 fi +# tidy up after ourselves +trap clean_up EXIT + # If the user did not specify an X authorization file to use, set up a temporary # directory to house one. if [ -z "$AUTHFILE" ]; then @@ -147,6 +163,10 @@ XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" 2>&1 & XVFBPID=$! sleep "$STARTWAIT" +if ! kill -0 $XVFBPID 2>/dev/null; then + echo "Xvfb failed to start" >&2 + exit 1 +fi # Start the command and save its exit status. set +e @@ -157,15 +177,6 @@ set -e # Kill Xvfb now that the command has exited. kill $XVFBPID -# Clean up. -XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1 -if [ -n "$XVFB_RUN_TMPDIR" ]; then - if ! rm -r "$XVFB_RUN_TMPDIR"; then - error "problem while cleaning up temporary directory" - exit 5 - fi -fi - # Return the executed command's exit status. exit $RETVAL -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]