On Thu, Feb 7, 2013 at 2:56 PM, David Golden <xdg@xdg.me> wrote: > On Wed, Feb 6, 2013 at 2:08 PM, Aaron Crane <arc@cpan.org> wrote: > > I don't know what hoops Capture::Tiny jumps through in this case, but > > AFAICT, that logic should work in Perl space just as well as in C > > space. > > If I recall, if it sees STDIN closed, it opens it to > File::Spec->devnull for the duration of the capture (while monkeying > around extensively with handles) and then closes it again afterwards. > I'd rather perl did not jump through that particular hoop without being asked ... Beyond performance and wasted file handles, I'd say something about not trying to keep people from doing stupid things, as that would also keep them from doing clever things. But why is there even a warning here? I read perldiag, but found no rationale. (What might break? Do some system prevent output on file handle 0? Could a child process inherit this fd0, and blow up since it is opened, but not for reading?) If there really is a reason, it'd be nice if perldiag gave it. :) EirikThread Previous | Thread Next