in reply to Re: STDIN schizofrenia
in thread STDIN schizofrenia

Cool. Well, the better way is to try to open /dev/tty, anyway (which I referenced in the original post, too). I was just going off of "use STDERR as a reference to the controlling terminal" notion that is used in many tools... like vim, for example, when you pipe the file to edit in off of STDIN.
[me@host scratch]$ ptyexec man vim | grep stdin - The file to edit is read from stdin. Commands are +read from stderr, which should be a tty. [me@host scratch]$

------------
:Wq
Not an editor command: Wq

Replies are listed 'Best First'.
Re: STDIN schizofrenia
by Abigail-II (Bishop) on Oct 14, 2003 at 08:40 UTC
    I've send a bugreport to p5p about this issue.

    Abigail

Re: STDIN schizofrenia
by Abigail-II (Bishop) on Oct 15, 2003 at 22:39 UTC
    To make it more confusing, dupping file descriptor 2 for read works fine, even in 5.8.x and 5.9.

    open STDERRIN, "<&2" or die $!; # Works. open STDERRIN, "<&STDERR" or die $!; # Does not work.

    Abigail