<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69127>69127</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lldb doesn't pause on ctrl+C if lldb was given the '-o run' option to start execution immediately
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mortie
</td>
</tr>
</table>
<pre>
When I run `lldb ./my-program`, type `run` manually and then hit ^C, lldb will catch the SIGINT and pause execution, as if it had hit a breakpoint.
When I run `lldb -o run ./my-program` to start execution immediately and then hit ^C, lldb does not pause execution, the SIGINT is just ignored.
This is happening on macOS 14.0, and I have verified that it happens on both lldb-1500.0.22.8 from Apple (`/usr/bin/lldb`) and the LLDB in Homebrew's LLVM package (version 17.0.2).
To reproduce, create any long-running executable (such as the C program `int main() { while (1); }`), run it with `lldb -o run /path/to/executable`, and hit ^C.
Interestingly, I did run `lldb -o 'log enable -v lldb all' -o 'run' ./my-program`, and with that extra logging, hitting ^C makes lldb output: `[internal] void lldb::SBDebugger::DispatchInputInterrupt() (0x16f51ab50)`, so some part of LLDB is clearly aware that it should trigger an interrupt.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VM1yqzgTfRp502UKhAGzYGHHH9-4KjOzyK2ZdQNt0I2QKP3Y8dtPScQ3kzupu0kKq3_O6XO60VoxKqKGFUdWnDbo3aRNM2vjBG06PdybvydScAbjFbAylXLoIGG8ne_bxejR4MzKlPEncPeFQoTxipUpzKg8SnkHVAO4UGMSDljxv6cQHMvchJTQo-unEAAv5_-f__gW4xf0loDeqPdOaBUy0IK4gHAw4RBLIXSG8HXRQrmEpSeWHta_XwDe6vj5H9zgNFiHxn30AjHPNAh09EvsgyYLSruvoP6LjLDw3VsHYlTa0PAJ57dJ2BAw4bKQEmoErWDG_s8XyHZJnGnof4YJrwRXMuIiKOBBt84hpNmQ1Gk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