aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2023-06-30 18:18:26 +0300
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2023-06-30 18:29:38 +0300
commit3714121907480869bb7e77ebce5810affbdb8bea (patch)
treefa37c4662da564ceca479584cff657546e285c9f /init
parent795dae827273f5b7e77a65653b40c98b89567ba7 (diff)
downloadbusybox-w32-3714121907480869bb7e77ebce5810affbdb8bea.tar.gz
busybox-w32-3714121907480869bb7e77ebce5810affbdb8bea.tar.bz2
busybox-w32-3714121907480869bb7e77ebce5810affbdb8bea.zip
win32: UTF8 console input: don't spin the CPU
This is a regression from ec99f03ae which changed Read into Peek in order to keep the record at the console queue. However, it failed to take into account that as a result, if no input is pending, that readConsoleInput_utf8 now returns immediately without waiting for input - unlike ReadConsoleInput. Other than incorrectly returning a FALSE value in such case, it also caused a busy-wait loop of windows_read_key and high CPU usage. Fix that by waiting till there's input before the peek. This should make it just like ReadConsoleInput - which idles till there's input.
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions