>>>>> On Thu, 1 Mar 2007 22:57:26 -0800, Eric Wilhelm <[EMAIL PROTECTED]> said:
> This still hangs for me on linux 5.8.4 and mac 5.8.6 at least. > perl -e 'use Module::Build; > my $a = Module::Build->prompt("foo", "a"); warn $a;' > /dev/null Of course it is because STDIN is open and working fine and so perl is waiting for your answer. Perl writes the prompt and waits. I would not call it hanging, it's waiting for an answer to a question it asked. If the user redirects the prompt to /dev/null, then he deliberately shoots himself in the foot and there is no way to find that out. When you replace your ">" with "<" you see that the behaviour is sane. > Again, why fileno and not this? > return $ENV{PERL_MM_USE_DEFAULT} || > ( !$self->_is_interactive && (-t STDIN || eof(STDIN)); I hope somebody else can explain the full story. My complaint was only that eof(STDIN) never returns on an open terminal STDIN filehandle. Just try: perl -e 'print eof(STDIN)' and wait. > Actually, what I don't understand is why it doesn't hang for everybody. It simply took a long while until somebody used Module::Build in a way to trigger the bug. -- andreas