JDevlieghere wrote:

@labath I originally used the MainLoop to handle `SIGINT` on non-Windows 
platforms and that didn't caused two test failures. I was able to reproduce the 
weird behavior by hand. 

With the current SIGINT handler:

```
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> 
```

I send a CTRL-C and a KeyboardInterrupt shows up immediately on screen:

```
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> 
KeyboardInterrupt
```

With the [MainLoop SIGINT 
handler](https://github.com/llvm/llvm-project/commit/3943112f5182065eed43d72e2960ed166737b237):

```
❯ lldb
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>>  
```
I send a CTRL-C and nothing happens. The `KeyboardInterrupt` only shows up 
after I hit enter:

```
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>>  
>>>
KeyboardInterrupt
```

Like you said, that doesn't work on Windows and we don't need that for the 
statusline so it's not on the critical path of this PR, but I'm curious if you 
can think of a reason this behaves oddly with the MainLoop implementation. 

https://github.com/llvm/llvm-project/pull/134956
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to