GNU bug report logs - #70519
30.0.50; Device for Emacs terminal I/O

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Mon, 22 Apr 2024 20:10:04 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Helmut Eller <eller.helmut <at> gmail.com>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 70519 <at> debbugs.gnu.org
Subject: bug#70519: 30.0.50; Device for Emacs terminal I/O
Date: Sat, 04 May 2024 19:19:12 +0300
> From: Helmut Eller <eller.helmut <at> gmail.com>
> Cc: 70519 <at> debbugs.gnu.org
> Date: Sat, 04 May 2024 17:47:00 +0200
> 
> On Sat, May 04 2024, Eli Zaretskii wrote:
> 
> > I attempted to fix this now that way on the master branch.  Would you
> > mind testing whether it does what you wanted?  If the current master
> > somehow doesn't do what you wanted, I'd appreciate a recipe for
> > reproducing the problematic behavior, so I could investigate.
> 
> It's much better now.  However, there is still something I would like to
> be different.  I basically do this:
> 
> 1) Start an xterm: xterm -e sh -c 'tty; exec sleep inf'
>    This displays /dev/pts/12 and waits.  Let's call this terminal A.
> 
> 2) Start Emacs in another terminal, let's call it terminal B, start
>    Emacs with: emacs -t /dev/pts/12
> 
>    This prints "Using /dev/pts/12" and Emacs displays stuff in terminal
>    A.  Which is what one would expect.
> 
> 3) Now when I press C-c in terminal B, I see ^C.  This is not what I
>    expect. I would expect that Emacs is interrupted and exits the same
>    way a GUI Emacs exits when pressing C-c.

Thanks for testing.  I'm not sure about item 3, I guess it has
something to do with the controlling terminal and how signals are
delivered depending on that.  AFAIU, the --terminal option causes
Emacs to close its original stdin, so Ctrl-C does not send SIGINT to
Emacs.  But I'm nowhere near being an expert on that.  Paul, can you
please comment on that?

In any case, does this allow you to do what you originally wanted,
i.e. debug a -nw session of Emacs without mixing GDB I/O and Emacs
I/O?




This bug report was last modified 1 year and 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.