From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#70519: 30.0.50; Device for Emacs terminal I/O Date: Sat, 4 May 2024 09:36:23 -0700 Organization: UCLA Computer Science Department Message-ID: <72ad1e4f-39fb-4287-874d-f0ddecb08e41@cs.ucla.edu> References: <871q6xkvm9.fsf@gmail.com> <86zftk4pau.fsf@gnu.org> <865xvthnm8.fsf@gnu.org> <87msp5bmvf.fsf@gmail.com> <86edahft33.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37861"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 70519@debbugs.gnu.org To: Eli Zaretskii , Helmut Eller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 04 18:37:08 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s3INo-0009du-AQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 May 2024 18:37:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3INS-0005Vf-HC; Sat, 04 May 2024 12:36:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3INN-0005V8-7l for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 12:36:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3INL-0007YL-9d for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 12:36:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3INi-0002nt-AV for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2024 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70519 X-GNU-PR-Package: emacs Original-Received: via spool by 70519-submit@debbugs.gnu.org id=B70519.171484061710771 (code B ref 70519); Sat, 04 May 2024 16:37:02 +0000 Original-Received: (at 70519) by debbugs.gnu.org; 4 May 2024 16:36:57 +0000 Original-Received: from localhost ([127.0.0.1]:54565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3INc-0002nf-VR for submit@debbugs.gnu.org; Sat, 04 May 2024 12:36:57 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]:45220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3INY-0002nZ-Of for 70519@debbugs.gnu.org; Sat, 04 May 2024 12:36:56 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id BE6E43C00F4E2; Sat, 4 May 2024 09:36:23 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id 9OipbbN-ZP17; Sat, 4 May 2024 09:36:23 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 7625C3C00F4E3; Sat, 4 May 2024 09:36:23 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 7625C3C00F4E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1714840583; bh=wjSFBYY7Zrf1tQJHGlmn6V576Nel4Ro283VJt9PZvuM=; h=Message-ID:Date:MIME-Version:To:From; b=b1p9pdcabYJ9bTeNri+oBRz4kpfODfmgWhFpMAYr8rapchAVqfoBoEYTV8+xgLb6j W4ZFcAT+F8nF7aeqbY02U86CPANhVmSBN/0HJG0aTF7RLLKMp1qh+ZwHABBWYw7k8v jJcnGdCGZTwNVfMoFhow3hXN2YL2Azz42NM4/wVwCDrE/4KrVUB6tl4eLP1QLWsSEB U5W1iU/Z+GhRQ6HLpOY5y/QPhoUJkUu8BUN2gHiBHxj+aCfLw/dqNC+kSIvrIktPS4 XLDdW+CsERTfyX0avZXoD3HJHo6G7AGaAE41ziW7zEvVwmeYAA7sZ/Kl2r8UY+2NlK 8qC4Cevs28b1g== X-Virus-Scanned: amavis at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 3itiw9Ni36Ly; Sat, 4 May 2024 09:36:23 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 4F75A3C00F4E2; Sat, 4 May 2024 09:36:23 -0700 (PDT) Content-Language: en-US In-Reply-To: <86edahft33.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284442 Archived-At: 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.