Eric Wong <e...@80x24.org> wrote:
> I was surprised when I noticed "local *STDIN = *STDIN" worked,
> but that was with Perl 5.28.1.  Unfortunately, we can't rely on
> users or testers having such a recent Perl version.  Even worse,
> it was silently a no-op on Perl 5.24.1 on Debian 9.x.  So, save
> the original handle and manually restore the original via open,
> when we're done.

Wow, I suck at writing commit messages when sleepy :x
The following is slightly better, at least I hope...

Subject: [PATCH] testcommon: fix run_script for older Perls

Using Perl "open" to dup(2) and save the old handles is required
since "local *STDIN = *STDIN" does not work on old Perls.  Even
worse, this was silently a no-op when tested with Perl 5.24.1 on
Debian 9.x and led to confusing failures in t/httpd-corner.t
lsof(1) tests when t/v2mirror.t was run before it from the same
worker process via t/run.perl.
--
unsubscribe: meta+unsubscr...@public-inbox.org
archive: https://public-inbox.org/meta/

Reply via email to