From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70519: 30.0.50; Device for Emacs terminal I/O Date: Sat, 04 May 2024 19:19:12 +0300 Message-ID: <86edahft33.fsf@gnu.org> References: <871q6xkvm9.fsf@gmail.com> <86zftk4pau.fsf@gnu.org> <865xvthnm8.fsf@gnu.org> <87msp5bmvf.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26296"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70519@debbugs.gnu.org To: Helmut Eller , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 04 18:20:03 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 1s3I7G-0006bp-RG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 May 2024 18:20:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3I6w-00023K-Ii; Sat, 04 May 2024 12:19:42 -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 1s3I6u-000234-V2 for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 12:19:41 -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 1s3I6t-0004IW-6Q for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 12:19:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3I7G-0002be-8B for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 12:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2024 16:20: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.171483958610004 (code B ref 70519); Sat, 04 May 2024 16:20:02 +0000 Original-Received: (at 70519) by debbugs.gnu.org; 4 May 2024 16:19:46 +0000 Original-Received: from localhost ([127.0.0.1]:54483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3I70-0002bH-6j for submit@debbugs.gnu.org; Sat, 04 May 2024 12:19:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3I6x-0002bA-PM for 70519@debbugs.gnu.org; Sat, 04 May 2024 12:19:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3I6U-0004G1-Ma; Sat, 04 May 2024 12:19:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nWXsT60j8G4apysv/w5Kx5LqvdONeW+BY6o+ZzC2tDI=; b=TORX2X2y8189 gIOZfWEiABPig59on+kg3lruVoeJ+23D/PMCbctVBwTi7PF3iNFMjCNHmNxEhtBkKcco/fgAPtWVr JA8FvUWPMpQc/R0ajUDi8I01CkWEZxSuz11c8mAzZkfN0jJ9j+QKY+qsQg33TMFcUHVLMUtTg0tCw YZ6aBcEz+JfYw2tu6lmv9StdheiEs4kGdK5go5GouXNC4Zo3uASFagQoirIAm13W0lGx98R0k6yZE aYe6V9nqGPoOltzpH4fPVt33KGVtXoXIwd9Vu2mR64aXIywBS1vZhnlknZB2hzHW7Job+Tn6tK+1G h1isdevwaHcr0STFCeNBbg==; In-Reply-To: <87msp5bmvf.fsf@gmail.com> (message from Helmut Eller on Sat, 04 May 2024 17:47:00 +0200) 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:284439 Archived-At: > From: Helmut Eller > 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?