[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ctrl-C ignored after pasting a long text in an X terminal emulator



On Tue 24 Jan 2023 at 10:03:31 (+0000), Richmond wrote:
> Greg Wooledge wrote:
> > On Mon, Jan 23, 2023 at 01:51:08PM +0000, Richmond wrote:
> >> I didn't test it for the reason I stated. I think it would be better for
> >> OP to test it as he won't do any more damage than he has already done.
> > Here's how you can reproduce the problem without having to worry
> > about execution of the pasted text as commands:
> >
> > 1) Import some text into the paste buffer (xclip -i < somefile).
> > 2) Open an xterm.
> > 3) From the xterm, run "xeyes" or any other X client program, no ampersand.
> > 4) Paste text into the xterm.
> > 5) Try Ctrl keys.  Observe that none of them work.
> > 6) Close the xterm using the window manager controls.
> >
> >> I have come across occasions where ctrl-c doesn't work but ctrl-z does
> >> however.
> > Sure, in a terminal that's in a normal state, that happens all the time,
> > if something is ignoring SIGINT.  The entire point of this thread is
> > that when the input buffer of the pty behind the xterm fills up, none
> > of the signals that are generated by keyboard input in a terminal work
> > any longer.  The only resort is to close the xterm.
> >
> No that wasn't the entire point of the thread. The OP didn't know the
> cause, it was presumed by David Wright that it was caused by the buffer
> filling up. But it could have been caused by some spurious character in
> the file, e.g. ctrl-s.

In that case, AFAICT, ^C still works, as the buffer's not full
(assuming it occurs early enough in the input), but it can kill
the foreground application too. ^Q also performs its normal function,
but that just reverts to the undesirable outcome of filling up
the buffer. And, of course, you've expanded the original problem
to one of pasting binary data.

Cheers,
David.


Reply to: