D120762 accidentally moved the interrupt check into the block which was
reading stdio. This meant that a ^C only took effect after a regular
character has been pressed.
This patch fixes that and adds a (pexpect) test.
Differential D121912
[lldb] Fix ^C handling in IOHandlerProcessSTDIO labath on Mar 17 2022, 7:13 AM. Authored by
Details D120762 accidentally moved the interrupt check into the block which was This patch fixes that and adds a (pexpect) test.
Diff Detail
Event TimelineComment Actions I also found this in the process of looking at https://github.com/llvm/llvm-project/issues/53673 (different issue same area). Bisected it to the same change you got, and this fixes things for me too. Do you know if the pexpect test will cleanup the debugee process if some part of the test fails? Or will we have that hanging around in its infinite loop? Comment Actions It won't, but the debuggee is not doing an infinite loop. The while (std::getline(std::cin, str)) thingy will terminate when it reaches EOF, which will happen when lldb gets killed at the latest (if lldb is still somewhat functioning, it will kill the inferior first, when *it* detects the EOF). |