If IPC::Run3::run3() is invoked with \undef for command's standard input, it will clobber STDIN, so STDIN is unusable after return from run3(): Reproducer: $ printf '1\n2\n'| perl -MIPC::Run3 -e 'while (<>) { print; run3([q{true}], \undef) }' 1 This should print: 1 2 But it stops after first loop. Observed in perl-IPC-Run3-0.046-3.fc20.noarch, F20. Reported to upstream, patch is there.
Created attachment 860208 [details] Proposed fix
(In reply to Petr Pisar from comment #0) > If IPC::Run3::run3() is invoked with \undef for command's standard input, it > will clobber STDIN, so STDIN is unusable after return from run3(): > > Reproducer: > > $ printf '1\n2\n'| perl -MIPC::Run3 -e 'while (<>) { print; run3([q{true}], > \undef) }' > 1 > > This should print: > > 1 > 2 > > But it stops after first loop. > > Observed in perl-IPC-Run3-0.046-3.fc20.noarch, F20. > > Reported to upstream, patch is there. Thanks for the report. Presuming you to have tested all this carefully and "just being into it" and me not having enough time to look into this today, feel free to apply the patch to git. Otherwise, I'll look into it, tomorrow.
I spent long time to understand what lead upstream to use the current code as the patch actually reverts it. The perl documentation regarding file handle globs and underlying file descriptors is very sparse. I did some tests and everything seems good with the patch, but I'd like somebody to review it.
perl-IPC-Run3-0.046-4.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/perl-IPC-Run3-0.046-4.fc20
perl-IPC-Run3-0.046-4.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/perl-IPC-Run3-0.046-4.fc19
Package perl-IPC-Run3-0.046-4.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing perl-IPC-Run3-0.046-4.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-2332/perl-IPC-Run3-0.046-4.fc19 then log in and leave karma (feedback).
Package perl-IPC-Run3-0.046-4.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing perl-IPC-Run3-0.046-4.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-2334/perl-IPC-Run3-0.046-4.fc20 then log in and leave karma (feedback).
perl-IPC-Run3-0.046-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
perl-IPC-Run3-0.046-4.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.