On Feb 1, 2007, at 5:42 PM, Andreas J. Koenig wrote:
The offending line:
+ return $ENV{PERL_MM_USE_DEFAULT} || ( !$self->_is_interactive &&
eof STDIN );
This hangs forever when the STDOUT is redirected and STDIN is not
redirected.
Indeed.
I think I've got a reasonable fix, does it look reasonable to you?
Of course, STDIN could be something more exotic like a tied fh, and
then I guess we'd be at the mercy of whomever tied it...
I found this by looking in the perl source for the smallest wrapper
around the PerlIOValid() macro.
-Ken
--- lib/Module/Build/Base.pm (revision 2264)
+++ lib/Module/Build/Base.pm (local)
@@ -471,7 +471,8 @@
sub _is_unattended {
my $self = shift;
- return $ENV{PERL_MM_USE_DEFAULT} || ( !$self->_is_interactive &&
eof STDIN );
+ return $ENV{PERL_MM_USE_DEFAULT}
+ || ( !$self->_is_interactive && !defined fileno STDIN );
}
sub _readline {