>>>>> On Thu, 1 Feb 2007 21:01:18 -0800, Eric Wilhelm <[EMAIL PROTECTED]> said:
> # from Andreas J. Koenig
> # on Thursday 01 February 2007 03:42 pm:
>> + return $ENV{PERL_MM_USE_DEFAULT} || ( !$self->_is_interactive &&
>> eof STDIN );
>>
>> This hangs forever when the STDOUT is redirected and STDIN is not
>> redirected.
> Hmm, when STDOUT is not a terminal, then _is_interactive is false. I
> guess the assumption here was that STDIN would be a set of scripted
> answers?
I believe there was *no* reasonable assumption at work.
> I guess it should only check eof(STDIN) if STDIN isn't a
> terminal, but the _is_unattended() should be true?
I assume that C<eof STDIN> is just a nono in sane code. Does the
perlfunc manpage not say so?
>> Introduced between 0.27_10 and 0.28 with SVN rev. 5919
> It looks like the hang would have still occurred in r5918, since
> _readline() would have still hit the eof(STDIN) check.
It probably would have, but after a prompt it also would have been
quite normal to read from STDIN. Somebody will eventually read the
prompt and act accordingly. This is the nature of a dialog on a
console. First write a prompt, then read an answer. Not the other way
round.
--
andreas