[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 Sat 21 Jan 2023 at 23:04:30 (-0600), David Wright wrote:
> On Sun 22 Jan 2023 at 05:17:09 (+0100), Vincent Lefevre wrote:
> > On 2023-01-21 21:19:06 -0600, David Wright wrote:
> > > On Sun 22 Jan 2023 at 03:50:17 (+0100), Vincent Lefevre wrote:
> > > > 3. Type Ctrl-C (one or several times) in the terminal.
> > > > But nothing happens.

> > > > Is there any way to avoid this issue?
> > > 
> > > Make sure that the application's data is saved, eg, ^X^S in emacs,
> > > but don't exit the application, eg, ^X^C in emacs.
> > > 
> > > Then click on the X that closes the xterm window, which takes
> > > down both xterm and the application with it. This is effectively
> > > an out-of-band signal.
> > 
> > This is what I've sometimes done until now, but in general,
> > I don't want to lose the work I've done in the shell, such
> > as temporary variable settings or things related to the
> > background jobs.

I did try out sending various signals to the bash process.
Some, like HUP, close the xterm and its emacs child, but
there are signals, like ABRT, that close the xterm but
leave the child in the care of /sbin/init.

So, for example, you can still paste your large copy into
the (emacs) child and at least get that safely stored.

But I didn't find any signal that could regain control of
bash once you've given it indigestion, so the & idea is
still my only suggestion.

Cheers,
David.


Reply to: