all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>, Helmut Eller <eller.helmut@gmail.com>
Cc: 70519@debbugs.gnu.org
Subject: bug#70519: 30.0.50; Device for Emacs terminal I/O
Date: Sat, 4 May 2024 09:36:23 -0700	[thread overview]
Message-ID: <72ad1e4f-39fb-4287-874d-f0ddecb08e41@cs.ucla.edu> (raw)
In-Reply-To: <86edahft33.fsf@gnu.org>

On 2024-05-04 09:19, Eli Zaretskii wrote:
> 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?

Closing stdin doesn't change a process's controlling terminal. On 
GNU/Linux you need to use ioctl with TIOCSCTTY and there are a bunch of 
other preconditions. See how emacs_spawn uses TIOCSCTTY:

        /* We ignore the return value
           because faith@cs.unc.edu says that is necessary on Linux.  */
        ioctl (std_in, TIOCSCTTY, 0);

This comment (and ignoring ioctl's return value) was added by rms in 
commit 084fd64ac9daee2a89d393f07ce87ec8df543330 dated 1993. I'm 
skeptical that the comment is true now. You might try adding code to 
check the return value and report any errors, though Emacs shouldn't 
abort (as it did before that 1993 change) if the ioctl fails.





  parent reply	other threads:[~2024-05-04 16:36 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
2024-05-04 16:25         ` Helmut Eller
2024-05-04 17:03           ` Eli Zaretskii
2024-05-04 16:36         ` Paul Eggert [this message]
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

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

  git send-email \
    --in-reply-to=72ad1e4f-39fb-4287-874d-f0ddecb08e41@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=70519@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.