Skip to content

xvfb-run: Special-case "-e /dev/stderr", etc. as redirection

In some execution environments, standard error is an inherited file descriptor, but we cannot actually reopen it by opening /dev/stderr or /proc/self/fd/2: for example, it might be a file or terminal owned by a different uid with restrictive permissions, or it might be an AF_UNIX socket.

It's generically useful to be able to send Xvfb output to stderr (and several packages are already doing this, which does work on Debian's official buildds), so special-case these pseudo-filenames and interpret them as redirection to a duplicate of the inherited file descriptor, which works in more situations.

Closes: #1087418, #921657

Edited by Simon McVittie

Merge request reports

Loading