develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [perl #24204] Dupping STDERR for reading.

Thread Previous | Thread Next
Nick Ing-Simmons
October 20, 2003 01:55
Re: [perl #24204] Dupping STDERR for reading.
Message ID:
Nicholas Clark <> writes:
>On Wed, Oct 15, 2003 at 12:44:48PM +0200, Abigail wrote:
>> Whether or not it's hokey isn't the point. Fact is that one used to
>> be able to dup STDERR and open it for reading, and now you no longer
>> can. Neither perldelta nor perl58delta mentions this, nor was it
>> deprecated, so I don't think this was an intentional decision. 
>> Therefore, I would classify it as a low priority bug.
>It has to be either a doc bug or a code bug.
>I think it's a low priority bug, and I'd like to be able to open
>STDERR (and STDOUT) for reading. (And STDIN for writing).
>If I've been crazy enough with my shell redirection to ensure that
>fds 0, 1 or 2 are open for read and write, I don't see why perl should
>stop me. But this is just my opinion, and I rarely do this sort of thing.
>But I currently don't care enough about this to actually work out what
>a patch would look like.

I don't think I care much either, but I think I know what it might 
look like.

The spots where those warnings/errors occur are where changes happen.
The question is whether we try and find out what mode the fd is in - 
which needs a fcntl() call - or just have an optional warning and 
leave the reality issues to the user.

>Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About