Package: pterm
Version: 0.58-1

pterm closes all open filedescriptors before running the command, which
means that you can't pass it (by arrangement) a filedescriptor.

Demonstration: compare the expected results from xterm with what
pterm does.

zircon$ 4>bug.outfile xterm -e /bin/sh -c 'exec 2>bug.stderr;exec >&4;echo some 
output'
zircon$ cat bug.outfile
some output
zircon$ cat bug.stderr
zircon$ 4>bug.outfile pterm -e /bin/sh -c 'exec 2>bug.stderr;exec >&4;echo some 
output'
zircon$ cat bug.outfile
zircon$ cat bug.stderr
/bin/sh: line 1: 4: Bad file descriptor

The culprit is this loop in unix/uxpty.c (line 756):

        /* Close everything _else_, for tidiness. */
        for (i = 3; i < 1024; i++)
            close(i);

Can this be taken out, please? It's just unhelpful.

-- PMM


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to