summaryrefslogtreecommitdiff
path: root/src/migration-scripts/https/4-to-5
diff options
context:
space:
mode:
authorRuben Herold <ruben@puettmann.net>2026-08-09 23:06:47 +0200
committerRuben Herold <ruben@puettmann.net>2026-08-09 23:06:47 +0200
commitb069ded58275ccb19d01b7dfa9944f27f0b4bb4d (patch)
tree0e5e208b1a0c8046b9929976d10d4139f1c5b3ec /src/migration-scripts/https/4-to-5
parentf6a1ff94f02282bd018b9b49ae1a9812619ec7ba (diff)
downloadvyos-1x-b069ded58275ccb19d01b7dfa9944f27f0b4bb4d.tar.gz
vyos-1x-b069ded58275ccb19d01b7dfa9944f27f0b4bb4d.zip
utils: T9185: fix ask_yes_no() busy-looping forever on non-tty stdin
commit-confirm (and ~40 other call sites) hang and burn a full CPU core indefinitely when invoked with stdin that isn't a TTY, e.g. a non-interactive vbash session (vbash -c "... commit-confirm 10; exit"). input() raises EOFError immediately and repeatedly in that case, and the except handler in ask_yes_no() looped straight back to input() with no backoff or exit condition. Check stdin.isatty() up front and return the default immediately when it's not a TTY, matching what a user pressing Enter (accepting the default) would already do interactively.
Diffstat (limited to 'src/migration-scripts/https/4-to-5')
0 files changed, 0 insertions, 0 deletions