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

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

Thread Previous | Thread Next
From:
Matt Sergeant
Date:
October 22, 2003 01:19
Subject:
Re: [perl #24204] Dupping STDERR for reading.
Message ID:
69F70CA6-0468-11D8-BC84-000393DA6672@sergeant.org
On 17 Oct 2003, at 17:11, Mark Jason Dominus wrote:

> I spent a large chunk of yesterday combing over POSIX to see what it
> says about this, and my conclusion is that POSIX requires that it be
> possible to open STDERR for reading.  (!!)

I'm not sure if this is the same bug or not, but sometimes under perl 
5.8 re-opening STDERR on another filehandle fails (I've been unable to 
pin down exactly why, as I found a work-around).

This (mis)feature is used extensively by qmail, and by extension is 
also used by qpsmtpd. I recently had to patch qpsmtpd I assume because 
of this change. (I switched to using POSIX::dup2() instead of open()).

Matt.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About