On Tue, Jul 21, 2009 at 9:25 AM, Shawn H. Corey<shawnhco...@gmail.com> wrote:
> John W. Krahn wrote:
[snip]
>>>>        close(STDERR);
>>>>        open(STDOUT , '>') || die "Unable to open STDOUT: $!";
>>>
>>> You're not opening STDOUT to anything.  And you closed STDERR so the die
>>> message can't go anywhere.  In fact, it goes into an infinite loop.
>>
>> No it doesn't, there is no loop there.
>>
>
> It goes into an infinite loop on my machine.  I suggest you try it before
> you make such blanket statements.
>
[snip]

What version of perl are you using, and on what OS? The following
returns immediately on any system I've ever seen, and I can't find
anything in the docs to the contrary:

          $ perl -e 'close(STDERR); die "help!"'

I do see that there were bug reports for problems caused by closing
STDERR in 5.6.2 on some versions of Windows compiled with certain
compilers with (then) experimental thread support enabled. What you
describe is not mentioned, and the problems were all supposed to have
been resolved in 5.8.0, but if you're seeing a problem perhaps you've
found a new bug, or an old one that still lingers. If so, you may want
to report it. At the very least it should be documented in perlport or
perlwin32 if the problem exists in the current release and is not
local to your system.

It is reasonable, though, to expect that advice given on this list
will assume that the code will be executed on a system that behaves as
documented.

HTH,

--jay
--------------------------------------------------
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.downloadsquad.com  http://www.engatiki.org

values of β will give rise to dom!

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to