On Thu, 21 Aug 2025 at 07:30, Chet Ramey <chet.ramey@case.edu> wrote:
> On 8/20/25 3:36 PM, Chet Ramey wrote:
> The real issue is that readline […] does not
> believe that read(2) can both succeed (return value > 0) *and* get a
> signal before it returns to user mode without setting errno. […]
> You either need to inject it into the input artificially or hit the process
> with SIGINT from another process with exquisitely precise timing.
>
There are various ways to enqueue multiple bytes into the pty buffer
quickly enough to trigger this behaviour, including:
- as previously suggested, define a macro in your terminal to send
multiple bytes starting with \x03
- stty intr ^[ # ^R then any cursor key
- printf '\x03\x1b' | xsel # or xclip # ^R then middle-click-paste
in Xterm
- ssh -o TCPNoDelay=no -o IPQoS=throughput … # ^R then mash multiple
keys
-Martin