diff options
author | Nicholas Clark <nick@ccl4.org> | 2022-07-30 11:05:14 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-02-11 07:17:42 +0100 |
commit | 839626ebadc11330c5c63b7db5508f403a6d75e1 (patch) | |
tree | 53030f4c19c9d7ca8b6a1185b092536f1693d9b6 /Porting | |
parent | fab9606d523663a135b180effc28e8154bc78854 (diff) | |
download | perl-839626ebadc11330c5c63b7db5508f403a6d75e1.tar.gz |
bisect-runner.pl must patch Configure to avoid myread looping infinitely
Configure can get stuck and ask questions for which it needs a valid answer
before it can continue. As-is, if you redirect stdin from /dev/null (or close
the file descriptor) it will (effectively) loop infinitely repeating the same
question, because it doesn't like empty string as an answer. Worse - it keeps
repeating the question to stdout - eg 'Where is your C library?'
Rather than attempting to patch the shell script to detect errors on read
(because they only matter the *second* time round the loop, *and* wouldn't
handle the /dev/null case), it's easier to patch the relevant loop so that
it will abort after too many loop iterations.
Diffstat (limited to 'Porting')
-rwxr-xr-x | Porting/bisect-runner.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index b8fcb4c9e2..0d32799134 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -2632,6 +2632,13 @@ index 3d2e8b9..6ce7766 100755 EOPATCH } + + if ($major < 38 && !extract_from_file('Configure', qr/Too many attempts asking the same question/)) { + # Without this, myread can loop infinitely trying to get a valid answer, + # and hence Configure gets stuck in a loop, outputting the same question + # repeatedly. This isn't what we need. + apply_commit('46bfb3c49f22629a'); + } } sub patch_hints { |