unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Helmut Eller <eller.helmut@gmail.com>, Paul Eggert <eggert@cs.ucla.edu>
Cc: 70519@debbugs.gnu.org
Subject: bug#70519: 30.0.50; Device for Emacs terminal I/O
Date: Sat, 04 May 2024 19:19:12 +0300	[thread overview]
Message-ID: <86edahft33.fsf@gnu.org> (raw)
In-Reply-To: <87msp5bmvf.fsf@gmail.com> (message from Helmut Eller on Sat, 04 May 2024 17:47:00 +0200)

> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: 70519@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?





  reply	other threads:[~2024-05-04 16:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 20:09 bug#70519: 30.0.50; Device for Emacs terminal I/O Helmut Eller
2024-04-23  5:32 ` Eli Zaretskii
2024-04-23  6:09   ` Helmut Eller
2024-05-04 10:34   ` Eli Zaretskii
2024-05-04 15:47     ` Helmut Eller
2024-05-04 16:19       ` Eli Zaretskii [this message]
2024-05-04 16:25         ` Helmut Eller
2024-05-04 17:03           ` Eli Zaretskii
2024-05-04 16:36         ` Paul Eggert
2024-05-04 17:19           ` Eli Zaretskii
2024-05-04 17:39             ` Paul Eggert
2024-05-04 18:19       ` Andreas Schwab
2024-05-04 18:27         ` Helmut Eller
2024-05-04 18:40           ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86edahft33.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70519@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eller.helmut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).