develooper Front page | perl.perl5.porters | Postings from March 2001

Re: [ID 20000913.003] Closing STDERR leaves fd(2) marked w/o?

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
March 14, 2001 09:17
Subject:
Re: [ID 20000913.003] Closing STDERR leaves fd(2) marked w/o?
Message ID:
200103141717.f2EHHUa19762@smtp3.ActiveState.com
On Wed, 14 Mar 2001 10:55:11 CST, Warren Hyde wrote:
>Warning/Error text always gets sent to file descriptor 2, and not STDERR,
>as advertised.  The documentation for "warn" and "die" say this:
>
>    warn LIST
>            Produces a message on STDERR just like `die', but doesn't exit
>            or throw an exception...
>    die LIST
>            Outside an `eval', prints the value of LIST to `STDERR' and
>            exits with the current value of `$!' (errno)...
>
>Begging to differ, I assert that the output does NOT go to STDERR, but it
>really goes to file descriptor 2, whatever that may be, and whether or not
>it is opened as an input or output source.

Can you see if this problem persists in 5.6.1-trial2 and report it
with a short test case if it does?  AFAIK, the only diagnostic output
that goes to stderr now is from passing the -D switches to perl.  All
warnings and errors generated by the script or by perl should go
to whatever STDERR is made to point to in the script.  (Of course,
there are some corner cases like panic messages that need to go to
stderr because the interpreter is not even initialized properly,
but those aren't "normal".)


Sarathy
gsar@ActiveState.com

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