At 2017-04-14T14:41:59-0700, Mark wrote:
> Package: xserver-xorg-core
> Version: 2:1.16.4-1
> Severity: serious
> Justification: unknow
> 
> Dear Maintainer,
> 
> For the ability to file other bug reports, this bug is in fact responsible for
> affecting.
> 
> I cannot, via the command
> "sudo /usr/share/bug/xorg/script 3>/tmp/script.log"
> 
> produce a script.log, say, for an attachment to a bug report. I am given:
> 
> /usr/share/bug/xorg/script: 19: /usr/share/bug/xorg/script: 3: Bad file
> descriptor

I think this may be a shell usage problem.

File descriptor (fd) 3 is not open by default.  Only the standard file
descriptors are; see stdin(3)[1].

The bug script redirects its standard output to fd 3.  It is the
responsibilty of the calling environment to open that fd.

You could write a small wrapper script that opens fd 3, directs it to a
file, and then executes the bug script.

$ cat > bugwrap
#!/bin/sh
exec 3> /tmp/script.log
exec /usr/share/bug/xorg/script
^D
$ chmod 600 bugwrap
$ sudo ./bugwrap

Regards,
Branden

[1] in the manpages-dev package

Attachment: signature.asc
Description: PGP signature

Reply via email to