Bug#868876: xvfb-run: 2>&1 breaks wkhtmltopdf
Control: found -1 xorg-server/1:1.0.2-6
Am 19.07.2017 um 14:09 schrieb Frank Doepper:
> Package: xvfb
> Version: 2:1.12.4-6+deb7u7
> Severity: normal
> Tags: patch
>
> Dear Maintainer,
>
> * What led up to the situation?
>
> running
> xvfb-run -a --server-args="-screen 0, 2048x1536x24" /usr/bin/wkhtmltopdf $*
>
> * What exactly did you do (or not do) that was effective (or
> ineffective)?
>
> wkhtmltopdf outputs its result to stdout and other things to stderr
>
> * What was the outcome of this action?
>
> the data on the output was broken
>
> * What outcome did you expect instead?
>
> a usable output of the called program, which is not mixed up with
> stderr.
>
> Removing the 2>&1 from the exec line in xfvb-run solves this.
>
> --- /usr/bin/xvfb-run 2017-07-07 07:09:57.000000000 +0200
> +++ - 2017-07-19 14:07:29.727690002 +0200
> @@ -180,7 +180,7 @@
>
> # Start the command and save its exit status.
> set +e
> -DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
> +DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@"
> RETVAL=$?
> set -e
Makes sense. FWIW, the bug has also been reported in Ubuntu a few years
ago: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1059947.
I did some research on snapshot.debian.org, and it seems this mixing of
stderr and stdout has always been there since the xvfb-run script was
added to the xvfb package.
I'll commit the patch to git in a few days, unless somebody objects or
beats me to it.
Cheers,
Sven
Reply to: