diff options
| author | Ruben Herold <ruben@puettmann.net> | 2026-08-09 23:06:47 +0200 |
|---|---|---|
| committer | Ruben Herold <ruben@puettmann.net> | 2026-08-09 23:06:47 +0200 |
| commit | b069ded58275ccb19d01b7dfa9944f27f0b4bb4d (patch) | |
| tree | 0e5e208b1a0c8046b9929976d10d4139f1c5b3ec /src/migration-scripts/https/0-to-1 | |
| parent | f6a1ff94f02282bd018b9b49ae1a9812619ec7ba (diff) | |
| download | vyos-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/0-to-1')
0 files changed, 0 insertions, 0 deletions
