From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 11 11:27:37 2025 Received: (at submit) by debbugs.gnu.org; 11 Mar 2025 15:27:37 +0000 Received: from localhost ([127.0.0.1]:45026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ts1W4-0008V8-BV for submit@debbugs.gnu.org; Tue, 11 Mar 2025 11:27:37 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58472) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ts1W0-0008Uc-9v for submit@debbugs.gnu.org; Tue, 11 Mar 2025 11:27:33 -0400 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 1ts1Vg-0005wG-Aq for bug-gnu-emacs@gnu.org; Tue, 11 Mar 2025 11:27:12 -0400 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ts1Vc-0007xF-Vl for bug-gnu-emacs@gnu.org; Tue, 11 Mar 2025 11:27:11 -0400 Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-7c55b53a459so162779785a.3 for ; Tue, 11 Mar 2025 08:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741706827; x=1742311627; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=myF0uuSVpD3xnwSfhz8n/w/HcfOy+cTV5RK2G+EfP4A=; b=HWyG+Tsu0bWPKo3v77UX1oSYoG6rD39MzQwo5XGIPEvfnbun0w1iFqWIRCdqqdBTgO HNBokCOLK5yYYI0U4g5VWBPy0kQ+hUGvnEGJ++KjTEYZOy2Wms3sSnrxQ1/vvv7sNaq7 o7brCaSHIcBZ2er08srlAz5yejVF+Icct33H6xs/0k6gq0i7giTSRfm2mQV2nZjPSFzY 0osKms1K2pO4QKKDW2h8NyWcxovu0KMBnLPt8TA2UZMSzaue78oXrohAlzuwxKJoB1t2 MG1rF5S5Pq6NWKZYjiwsTzP3ZsMpJ1gFZOuh7afI0GOcPUHCxppGlZ6A/AelUVLkls2v cX+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741706827; x=1742311627; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=myF0uuSVpD3xnwSfhz8n/w/HcfOy+cTV5RK2G+EfP4A=; b=r4Ytc9ahqBRC3OvZ60DKra2W7ajbGTa9Lrjq6mHVGp4NVb/RqXXLMqQ00dS3zD7tX5 PMRqSxN1TO+ujuC7eDopwN9XZQTiMNg3bpBp5n7odJ6Qxm8+HuawvEGV9hfDXPojkWdM EObNVqUXZ/tqSoV3KbZcvZueTeEdSjFSt3m4WAl5jyrIRUmLWgi6KTdKLmgE3lv2OZio 5X7i2v/mLVlF2JVrBxlNKFzMGQ5Z9rZxkvzReMHhLaVQOpmtYhx05p34IP8Jpo+z/LPE nHosHgAiKmdzDrIQytO+iMRGjSEdBpaXxyQcdevBCjphBSGGrQSzsllRcaEHOBlK2+h5 wTCQ== X-Gm-Message-State: AOJu0YzfH7z2QtNgh4g1tr2AMhN2FlKyXwYZpx7pO2ZD/Bxxyc7ORQ5L GoTTABdeSTgf3tjO6RqAa1JZrjCoFvm6qmr5Nx9UYWzaLBe+eNWTeH8wPR6vAxnE5ttHZbaZ+6T hK/rdvYftpuZ1S8IaRhntu2AIapBVejJZ X-Gm-Gg: ASbGncty2aDA7MX5Vq7nEhh8f3JOxyOCrnqkGFs+e+oodmrMzviWEzpwud/+BvGtK/B g8qeT50W/dSFjfDtFZ3wj/Lw/meGkzEWu62o7bN/tFoNpoGIzzm4tth5vSPP4I8BEMQFFkbDYC5 wdBuaXBidfBGl1OCTjSfMKK7esuCVSUJfqya3oSgonMOOmtiW0SrAw1vLSd4I= X-Google-Smtp-Source: AGHT+IGLR9fphlWFPxPaczA84qStMs/LLUX0khKlgoNYw+C/l9mXEMsdqv5As8Ed7wPFehXldkB/ppZpQYddFuWHe3U= X-Received: by 2002:a05:6214:500f:b0:6e4:4011:9df7 with SMTP id 6a1803df08f44-6e9005f79a2mr273090316d6.16.1741706826870; Tue, 11 Mar 2025 08:27:06 -0700 (PDT) MIME-Version: 1.0 From: Garid Zorigoo Date: Wed, 12 Mar 2025 00:26:53 +0900 X-Gm-Features: AQ5f1JpurHPNlD-6Cg1Db_VTJL135niXSfxTKPSZpJLgU2P7J3VIa_Syp4kIezc Message-ID: Subject: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000b7f305063012b80d" Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=garidzorigoo@gmail.com; helo=mail-qk1-x733.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --000000000000b7f305063012b80d Content-Type: text/plain; charset="UTF-8" I cannot interrupt the long process in the inferior python. How to reproduce: 1. M-x run-python 2. Start long process (for example below: time.sleep()) 3. Both C-c C-c and M-x comint-interrupt-subjob doesn't interrupt the process ----------------------------------------------------------------------------- Python 3.13.2 (main, Feb 5 2025, 08:05:21) [GCC 14.2.1 20250128] on linux Type "help", "copyright", "credits" or "license" for more information. warning: can't use pyrepl: terminal doesn't have the required clear capability; TERM=dumb >>> import time >>> time.sleep(1000) C-c C-c C-c C-c M-x c o m i n t - i n t e r r u p t - s u b j o b RET ---------------------------------------------------------------------------- This is probably due to the new updated REPL in python-3.13 (this seems caused another issue discussed in the thread https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-02/msg01038.html) In GNU Emacs 30.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.48, cairo version 1.18.2) Windowing system distributor 'The X.Org Foundation', version 11.0.12401006 System Description: Arch Linux Configured using: 'configure --with-x-toolkit=gtk3 --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --disable-build-details --with-cairo --with-harfbuzz --with-libsystemd --with-modules --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=fcitx locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: fido-vertical-mode: t icomplete-vertical-mode: t icomplete-mode: t fido-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date compile text-property-search cl-seq cl-extra help-mode files-x python rx project byte-opt gv bytecomp byte-compile compat pcase treesit comint subr-x ansi-osc ring ansi-color cus-start cus-load icomplete cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 111495 10661) (symbols 48 13485 0) (strings 32 32939 3083) (string-bytes 1 844154) (vectors 16 14053) (vector-slots 8 183289 6546) (floats 8 38 3333) (intervals 56 393 10) (buffers 992 14)) --000000000000b7f305063012b80d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I cannot interrupt the long process in the inferior python.

How to reproduce:
1. M-x run-python
2. Start long proces= s (for example below: time.sleep())
3. Both C-c C-c =C2=A0and =C2=A0 M-x= comint-interrupt-subjob doesn't interrupt the process

---------= --------------------------------------------------------------------
Pyt= hon 3.13.2 (main, Feb =C2=A05 2025, 08:05:21) [GCC 14.2.1 20250128] on linu= x
Type "help", "copyright", "credits" or &= quot;license" for more information.
warning: can't use pyrepl: = terminal doesn't have the required clear capability; TERM=3Ddumb
>= ;>> import time
>>> time.sleep(1000)
=C2=A0 C-c C-c = =C2=A0C-c C-c

=C2=A0 M-x c o m i n t - i n t e r r u p t - s u b j o= b RET
-----------------------------------------------------------------= -----------

This is probably due to the new updated REPL = in python-3.13
(this seems caused another issue discussed in the
thre= ad=C2=A0h= ttps://lists.gnu.org/archive/html/bug-gnu-emacs/2025-02/msg01038.html)<= /div>


In GNU Emacs 30.1 (build 2, x86_64-= pc-linux-gnu, GTK+ Version 3.24.48,
cairo version 1.1= 8.2)
Windowing system distributor 'The X.Org Foundation', versio= n 11.0.12401006
System Description: Arch Linux

Configured using:<= br>=C2=A0'configure --with-x-toolkit=3Dgtk3 --sysconfdir=3D/etc --prefi= x=3D/usr
=C2=A0--libexecdir=3D/usr/lib --localstatedir=3D/var --disable-= build-details
=C2=A0--with-cairo --with-harfbuzz --with-libsystemd --wit= h-modules
=C2=A0--with-native-compilation=3Daot --with-tree-sitter '= CFLAGS=3D-march=3Dx86-64
=C2=A0-mtune=3Dgeneric -O2 -pipe -fno-plt -fexc= eptions -Wp,-D_FORTIFY_SOURCE=3D3
=C2=A0-Wformat -Werror=3Dformat-securi= ty -fstack-clash-protection
=C2=A0-fcf-protection -fno-omit-frame-pointe= r -mno-omit-leaf-frame-pointer -g
=C2=A0-ffile-prefix-map=3D/build/emacs= /src=3D/usr/src/debug/emacs -flto=3Dauto'
=C2=A0'LDFLAGS=3D-Wl,-= O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro
=C2=A0-Wl,-z,now -Wl,-= z,pack-relative-relocs -flto=3Dauto''

Configured features:ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEGLCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
IN= OTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL= _BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important = settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 value of $XMODIFI= ERS: @im=3Dfcitx
=C2=A0 locale-coding-system: utf-8-unix

Major mo= de: Lisp Interaction

Minor modes in effect:
=C2=A0 fido-vertical-= mode: t
=C2=A0 icomplete-vertical-mode: t
=C2=A0 icomplete-mode: t=C2=A0 fido-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode:= t
=C2=A0 eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-= indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
= =C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global= -font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode:= t
=C2=A0 minibuffer-regexp-mode: t
=C2=A0 line-number-mode: t
=C2= =A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-com= position-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compressi= on-mode: t

Load-path shadows:
None found.

Features:
(sh= adow sort mail-extr emacsbug message mailcap yank-media puny dired
dired= -loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-= config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231
mailab= brev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util ma= il-prsvr mail-utils time-date compile text-property-search
cl-seq cl-ext= ra help-mode files-x python rx project byte-opt gv bytecomp
byte-compile= compat pcase treesit comint subr-x ansi-osc ring ansi-color
cus-start c= us-load icomplete cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc = paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode m= wheel term/x-win x-win term/common-win x-dnd touch-screen
tool-bar dnd f= ontset image regexp-opt fringe tabulated-list replace
newcomment text-mo= de lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearc= h easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-= core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indo= nesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan = thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian= slovak czech european ethiopic indian
cyrillic chinese composite emoji-= zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev ob= array oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-fac= e macroexp files window
text-properties overlay sha1 md5 base64 format e= nv code-pages mule
custom widget keymap hashtable-print-readable backquo= te threads dbusbind
inotify lcms2 dynamic-setting system-font-setting fo= nt-render-setting
cairo gtk x-toolkit xinput2 x multi-tty move-toolbarmake-network-process native-compile emacs)

Memory information:
= ((conses 16 111495 10661) (symbols 48 13485 0) (strings 32 32939 3083)
= =C2=A0(string-bytes 1 844154) (vectors 16 14053)
=C2=A0(vector-slots 8 1= 83289 6546) (floats 8 38 3333) (intervals 56 393 10)
=C2=A0(buffers 992 = 14))

--000000000000b7f305063012b80d-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 22:04:50 2025 Received: (at 76943) by debbugs.gnu.org; 13 Mar 2025 02:04:50 +0000 Received: from localhost ([127.0.0.1]:52505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tsXwH-0002au-Rv for submit@debbugs.gnu.org; Wed, 12 Mar 2025 22:04:50 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:52509) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tsXwD-0002ab-Kz for 76943@debbugs.gnu.org; Wed, 12 Mar 2025 22:04:46 -0400 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-46fa764aac2so4016871cf.1 for <76943@debbugs.gnu.org>; Wed, 12 Mar 2025 19:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741831479; x=1742436279; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=1bhDY2T/mqPE3xGInc/gw+dPdnM9z+TbFTyFji6ZJB0=; b=A4yS9EjBy5X+q9vU1bCapq5700/jurQ2/lJMeKimK7SvkN1FvDJ9tGIaxfE83Selip IwUHZc+w2YG2Xyvp0WVHYYGERzjMAozb2+4twFhry764LQz+rEtwJvzksSPM2cGPDcfb 5bPOcyNqtYS4waP9c5Kp2YbDXmrOYiK3OSxulA6YXt+GL6wKSgkSZ1FpWIE9npGLjXfZ g5njD+ZN1vt/XVfdX9VikayGrJ5xmJX6fvMX0ph8GTGhft8Vt7xfJUWovGreAatei/zv //0GycQiyiB2pIpI85lelureFb261OfX02QL6rnQ6ke9FmwalL49BZVqZoYabJOnWRtT 1SSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741831479; x=1742436279; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1bhDY2T/mqPE3xGInc/gw+dPdnM9z+TbFTyFji6ZJB0=; b=YoDO+J+pmN8OO8tQQ0GBmrVO/eU4ylWI302WSIKhsDaBQk6u2KOiGD6Z7Pqd1B5gMr HMf4AlSOYDnDsQR4NBuFdV41akvsHDyKXziyU1KryLzdTiFsh7WjVvfWRBX6MWqIydA2 lQVGIoXVv9kM+ku2JI2AFiDm2idu5F3zQozOLCK3c4THLLjCy8sUqHFaHOlCZWhvM4wj F4+ObKdD0h05I/K6IbXky8Vs22fze2V12l5LJRdzWZRtz5ShiXXzg84ljxy6DyJ01k/i QKQpY48Nh5RinhTEPr7SGNdpC6AZbES2iX0L5+7HWDFamCk6R5hnLUPDVLhMH6H9Po7e E5xQ== X-Gm-Message-State: AOJu0YzlP+mkuDj+V1PL+xEr4vI1p6R9jItuscbudMUqLxKx3fvvwkb9 GQFO/atcSocDV8NbVh1vDjsFWw/DYObRlmzU3Ha7IFLjFHAPVxdVEITA2mmj8C2Q0l93SiKdQi0 xcYkQFqc6Irbq+cIBzbp/EQ5ipJ5ct9d6Zso= X-Gm-Gg: ASbGncumfBIsyjNfSHwMcDtbBCVEUNZAGftHaI9v0swsi3xgeHQZRS9BlJvEeXMhjG7 RInfNitTGddwtc7fxlDe2hiTLYSJS8CIU59k2zGKcrFQ5a7V3D24UUeA1hojXb6m7qf0nKyrZ1b u8i+earTGWXQ65pXK/n7TRko/zs0/u3ersoB6QOg0xTpZRWQSZ9T8LUTC9JhU= X-Google-Smtp-Source: AGHT+IE4QZUkaZy52Dn1bEVREv7jX7tt0mTt5EK87KVVDljAtZPsVoua7O/XyWjf1AywWfclSGSI6XKcV61a2oSEgK8= X-Received: by 2002:a05:6214:5188:b0:6d9:3016:d101 with SMTP id 6a1803df08f44-6e9006d9003mr317059276d6.41.1741831479418; Wed, 12 Mar 2025 19:04:39 -0700 (PDT) MIME-Version: 1.0 From: Garid Zorigoo Date: Thu, 13 Mar 2025 11:04:23 +0900 X-Gm-Features: AQ5f1JqYU-T8HRFzB5odzwny7tvbbavTAVLD9NbMp6kZ-itNMmko2xOn9Vbt6qg Message-ID: Subject: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python To: 76943@debbugs.gnu.org Content-Type: multipart/alternative; boundary="00000000000096e19706302fbe2d" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000096e19706302fbe2d Content-Type: text/plain; charset="UTF-8" I found a work around, not sure how & why. Changing the value of comint-ptyp seems to make comint-interrupt-subjob work: (setq comint-ptyp nil) Hope this helps. I believe that inferior-python should be able to interrupt subjobs by default (i.e. without the user changing the above variable value). Garid --00000000000096e19706302fbe2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I found a work around,=C2=A0not s= ure how & why.
Changing the value of=C2=A0
comint-ptyp seems to make=C2=A0comint-interrupt-subjob work:

(setq comint-ptyp nil)

Hope this=C2=A0helps.

I believe that inferi= or-python should=C2=A0be able to interrupt=C2=A0subjobs
by default (i.e. without the user=C2=A0changing the = above variable value).


Garid


=C2=A0

--00000000000096e19706302fbe2d-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 13 02:22:22 2025 Received: (at 76943) by debbugs.gnu.org; 13 Mar 2025 06:22:22 +0000 Received: from localhost ([127.0.0.1]:53038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tsbxW-0006tt-IM for submit@debbugs.gnu.org; Thu, 13 Mar 2025 02:22:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49600) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tsbxU-0006th-IR for 76943@debbugs.gnu.org; Thu, 13 Mar 2025 02:22:21 -0400 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 1tsbxP-00016M-6x; Thu, 13 Mar 2025 02:22:15 -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=1n/UBmhxHtOOKlZIr2n5xXxJU4qJsYNOmT+gqHV2tsk=; b=E613Aj7eAR7N ckH1EciafYAnVz+jjrvjlGa/wZ9orbkO0OtzJGFF4n/lR4lJlF6E6YNWkeXDWjAloahPpB5v0e3yJ n1Njq7YM+pF41qVaq5iiHP8omXZoU1FRo5Ays0dZnoiyU2Lo87fPnx4+nxRqapVl/1N7SrNTZfckN wK0RoUBPQZAjQoFWT3Cd0ruADL96PdAemp4BZbVfublCVTDaDUCB9I53/ToT1xuYkfh2Ft0XBSqIm 2Nsq0CVANlcDPHY6A76Lwp1vi5IDbxD9leOTP8ycNKb+s1yTe2FsUh+x3xZhY6jtJWApBJx0VNFmf uZV3nvEtGGywHN37fOdGmA==; Date: Thu, 13 Mar 2025 08:22:13 +0200 Message-Id: <86h63x4fhm.fsf@gnu.org> From: Eli Zaretskii To: Garid Zorigoo , kobarity In-Reply-To: (message from Garid Zorigoo on Thu, 13 Mar 2025 11:04:23 +0900) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Garid Zorigoo > Date: Thu, 13 Mar 2025 11:04:23 +0900 > > > I found a work around, not sure how & why. > Changing the value of comint-ptyp seems to make comint-interrupt-subjob work: > > (setq comint-ptyp nil) > > Hope this helps. > > I believe that inferior-python should be able to interrupt subjobs > by default (i.e. without the user changing the above variable value). kobarity, any comments or suggestions? From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 13 12:13:42 2025 Received: (at 76943) by debbugs.gnu.org; 13 Mar 2025 16:13:42 +0000 Received: from localhost ([127.0.0.1]:57792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tslBm-0008Rj-76 for submit@debbugs.gnu.org; Thu, 13 Mar 2025 12:13:42 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:44346) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tslBj-0008RR-J1 for 76943@debbugs.gnu.org; Thu, 13 Mar 2025 12:13:40 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-223fb0f619dso23767855ad.1 for <76943@debbugs.gnu.org>; Thu, 13 Mar 2025 09:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741882413; x=1742487213; darn=debbugs.gnu.org; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:from:to:cc:subject:date:message-id:reply-to; bh=yT6CiVkIJbkWtgxXh2vsdPRidDg4BzeZh0Xt/X3uI0g=; b=CkPQLxJ4YNzOLCM1luE0kKodbWG7/D/VoH0n5koX09J2BX6k4evgOeO8PHaQQJIf84 iE8R/M73n+yAlpyUhRC9KOq0/u6bIA6jjSFYQHqRb8u5rfj+QMkHsgJmfo+MKYQpS3/J rADOiqlrMpB1DFhBYf0Pu9qOi6p43E90QXQv/UWfbM5+PHeK8mrKNLpr6Et9rILDaDtR 5KoYDoB+EZijgb3Pu9Zt+QyQ2lb0znRJLvp+69B2AInl4Fh7Al+CmX7qT00cu4yYriP+ m9IPoLGtGJODHBVxVVIEN1jCBCv6l9F0zWniBVX4obxrRZ81AkV6hftUkGKgIvWFWP6V WEow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741882413; x=1742487213; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yT6CiVkIJbkWtgxXh2vsdPRidDg4BzeZh0Xt/X3uI0g=; b=eyWhjSYAvFBPCgeyqFTnnjC1xJknvfcVoEkzJHFup2K4igkU+yib6Luf5jDjtAx5Nx GvCdDGMcUh8K28eO4f4s8NgsZGQw1HFkmDwLz3an4hQ96nDyWyS8tp8DS/b8rVbAPPTC Tx3RmV1LXzi+shLdb66G3hXlDa+wfQGWXPUkEzPjcPYdCi/L9Mww3bRwvXDkXlwO1IYV cmk1JYeLWnPKNsIrvuQXa1lwv4tTE65991k8uv50rqMJggxxDy18PVPxhvYNkisPK1J5 kQkjhBLFkHGm6Ikd2Lid5Z44dxYNEVozUk2lBvPoOe6tkNRNRxAc5pZdKwyII0zDk/3P ocww== X-Forwarded-Encrypted: i=1; AJvYcCX6Fhy9y8yE/9NuVxgU3q59atc8B252ardPTcJmOLs4zBNSqTigd/Ot6BnBmrWspOHacFXHUQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxYMmEUDUNnHRxOhTCkPKRZScT6jiuD584Fvyeyz4Eh3j1D06UT cKt0eidaB3xKLzBXaE8UFhhCNCkz20QfJ2Oxomz016cWzwVWD1ug X-Gm-Gg: ASbGncu1Vm5wEBVq4vM+gnTHfTk9MPq75acha2rEfH24kqgJ1U1xVK/cfaS/rHz8nWC ic+tiW86y9TQYj+5zgzRuMdRkFvDh9PcRq6pNt3wGVy/MZ6qx9pas1GZQT7GR1EerlMcyBIrtfJ XIV9WQi51udEuut6Nc6h23M4bR0iB+QrN90mB2b38RriD+ECEKdwpfYDA3Jh5mTSZp6AaJtAUlq KBhmNtLmTSC6oTy2IhYzYMkgYpWt7RoCsbxQDDKSXLo4JILMDT+/F3Dt4g+C6cSOhtnv08+MNEC O2O0CagAYXzwxO9WjheQaE/iVqCEuolOHp9Q/EA9b2ze43qH9v4p53oTVAl446zY9OX8Z4UXa1Q = X-Google-Smtp-Source: AGHT+IHRDUbyBXbvQLl2ZNipI+ihgQBKbb3Yy4W3SpT1QVSr3+qDh4BwwmLzqRjbuYYU/jYhtFz9wg== X-Received: by 2002:a17:902:cec2:b0:223:65dc:4580 with SMTP id d9443c01a7336-225931b111cmr156533325ad.52.1741882413157; Thu, 13 Mar 2025 09:13:33 -0700 (PDT) Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-225c6bbfdfesm15164925ad.203.2025.03.13.09.13.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Mar 2025 09:13:32 -0700 (PDT) Date: Fri, 14 Mar 2025 01:13:29 +0900 Message-ID: From: kobarity To: Mattias =?ISO-8859-1?Q?Engdeg=E5rd?= , Eli Zaretskii Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python In-Reply-To: <86h63x4fhm.fsf@gnu.org> References: <86h63x4fhm.fsf@gnu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/31.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, Garid Zorigoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii wrote: > > > From: Garid Zorigoo > > Date: Thu, 13 Mar 2025 11:04:23 +0900 > > > > > > I found a work around, not sure how & why. > > Changing the value of comint-ptyp seems to make comint-interrupt-subjob work: > > > > (setq comint-ptyp nil) > > > > Hope this helps. > > > > I believe that inferior-python should be able to interrupt subjobs > > by default (i.e. without the user changing the above variable value). > > kobarity, any comments or suggestions? This turned out to be an effect of the setting to make the tty RAW, which Mattias and I did as part of #68559. (defconst python-shell-setup-code "\ try: import tty except ImportError: pass else: tty.setraw(0)" "Code used to setup the inferior Python processes.") This is to disable echo back on MacOS, so there is a workaround to limit this setting to MacOS only. That would not solve the `comint-interrupt-subjob' problem on MacOS, though. `comint-ptyp' is passed as the CURRENT-GROUP argument of `interrupt-process' function. It is finally processed by the process_send_signal function in process.c. If CURRENT-GROUP is non-nil, it first try to send the control character instead of sending the signal. However, I believe the control character is ignored because tty is set to RAW by the above code. I feel it would be better for process_send_signal to check if the tty is RAW, but I am not sure if that is appropriate. Since process_send_signal checks whether control characters such as VINTR are valid, we can also avoid this problem by disabling VINTR as follows. (defconst python-shell-setup-code "\ try: import tty import termios except ImportError: pass else: tty.setraw(0) attr = termios.tcgetattr(0) attr[-1][termios.VINTR] = b'\x00' termios.tcsetattr(0, termios.TCSANOW, attr)" "Code used to setup the inferior Python processes.") In summary, there are at least four possible options. 1. Set `comint-ptyp' to nil. 2. Improve process_send_signal to check if tty is RAW. 3. Disable VINTR in addition to making the tty RAW. 4. Do not set tty to RAW except on MacOS. If we choose 4, I believe MacOS requires one of 1-3. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 13 12:49:21 2025 Received: (at 76943) by debbugs.gnu.org; 13 Mar 2025 16:49:21 +0000 Received: from localhost ([127.0.0.1]:57859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tslkH-0001qz-3C for submit@debbugs.gnu.org; Thu, 13 Mar 2025 12:49:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46764) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tslkE-0001qe-H8 for 76943@debbugs.gnu.org; Thu, 13 Mar 2025 12:49:18 -0400 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 1tslk8-0000MY-95; Thu, 13 Mar 2025 12:49:12 -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=Ws2A5W8a4oaJY7qD7tBvg1gUEKmsFiIxh3tX8K81cNM=; b=jtdMQYmsioK4 En1Z0MlE63VH5bO8IasK99UhQ0Wh83tShOwLigli/RcFiZCMWO7JEDpfLhNtkTek6/29Nfo4sfCZg ZW89SL5chiQdrNTbCCWfI6aJX97W0XeW6LZvahcNSjAHqlrW7+r3MdQTWFPym/saRIQRTDXYvwj63 Lv99UphY5RZ7aR62eLDjYPzIuMAY88mVQSfp9MT/uFwyrewlSVi5jmnhLTyCDPvOEa6WYvJb0rQrs oBZjZP1UgT/erdlyTkxCKJxi1BoY2PMq/NX6FTnoK+R/VU/Ky0l2QmQwUF7ZaqESSm22iD5ClFonb GVhCuG5j+Fny9Tx6OV2VbQ==; Date: Thu, 13 Mar 2025 18:49:09 +0200 Message-Id: <86r03027wa.fsf@gnu.org> From: Eli Zaretskii To: kobarity , Paul Eggert In-Reply-To: (message from kobarity on Fri, 14 Mar 2025 01:13:29 +0900) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python References: <86h63x4fhm.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, mattias.engdegard@gmail.com, garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 14 Mar 2025 01:13:29 +0900 > From: kobarity > Cc: Garid Zorigoo , > 76943@debbugs.gnu.org > > Eli Zaretskii wrote: > > > > > From: Garid Zorigoo > > > Date: Thu, 13 Mar 2025 11:04:23 +0900 > > > > > > > > > I found a work around, not sure how & why. > > > Changing the value of comint-ptyp seems to make comint-interrupt-subjob work: > > > > > > (setq comint-ptyp nil) > > > > > > Hope this helps. > > > > > > I believe that inferior-python should be able to interrupt subjobs > > > by default (i.e. without the user changing the above variable value). > > > > kobarity, any comments or suggestions? > > This turned out to be an effect of the setting to make the tty RAW, > which Mattias and I did as part of #68559. > > (defconst python-shell-setup-code > "\ > try: > import tty > except ImportError: > pass > else: > tty.setraw(0)" > "Code used to setup the inferior Python processes.") > > This is to disable echo back on MacOS, so there is a workaround to > limit this setting to MacOS only. That would not solve the > `comint-interrupt-subjob' problem on MacOS, though. > > `comint-ptyp' is passed as the CURRENT-GROUP argument of > `interrupt-process' function. It is finally processed by the > process_send_signal function in process.c. If CURRENT-GROUP is > non-nil, it first try to send the control character instead of sending > the signal. However, I believe the control character is ignored > because tty is set to RAW by the above code. > > I feel it would be better for process_send_signal to check if the tty > is RAW, but I am not sure if that is appropriate. Paul, WDYT about this? > Since process_send_signal checks whether control characters such as > VINTR are valid, we can also avoid this problem by disabling VINTR as > follows. > > (defconst python-shell-setup-code > "\ > try: > import tty > import termios > except ImportError: > pass > else: > tty.setraw(0) > attr = termios.tcgetattr(0) > attr[-1][termios.VINTR] = b'\x00' > termios.tcsetattr(0, termios.TCSANOW, attr)" > "Code used to setup the inferior Python processes.") > > In summary, there are at least four possible options. > > 1. Set `comint-ptyp' to nil. > 2. Improve process_send_signal to check if tty is RAW. > 3. Disable VINTR in addition to making the tty RAW. > 4. Do not set tty to RAW except on MacOS. > > If we choose 4, I believe MacOS requires one of 1-3. Thanks. Let's see what Paul thinks about this, and take it from there. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 20 07:43:39 2025 Received: (at 76943) by debbugs.gnu.org; 20 Mar 2025 11:43:39 +0000 Received: from localhost ([127.0.0.1]:55889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvEJF-0001NA-Th for submit@debbugs.gnu.org; Thu, 20 Mar 2025 07:43:38 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:47119) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tvEJC-0001Ml-Va for 76943@debbugs.gnu.org; Thu, 20 Mar 2025 07:43:35 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-22401f4d35aso10143845ad.2 for <76943@debbugs.gnu.org>; Thu, 20 Mar 2025 04:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742471008; x=1743075808; darn=debbugs.gnu.org; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:from:to:cc:subject:date:message-id:reply-to; bh=f2Wsg5VIB8ZYQ7dLZC24XedHI71P1kTIO9l0VEpsJkA=; b=KdjRwrus2pj4Xfo0x60BRQMp/6kLom7fSwIPp2nMdzfiXAjHPo2lKDfZGSS1Tx5HTX 9dAou7fcNGiC4FLROhCFE36AJ9NTrNWAGCKCQnI3raxBGi/FG7WVsiLPgraKdbkKEJQy XPwF5T43Fg7sYJjGFFxjBSDlCl4nfq6jFLdGsnIGkWnzJozXi/DfBU/z+QWEz4a7vdsR 7FanARKmDEVhMxYLH/++iy2/0cZQoOJrsW5V3Kp5Blbop1JejCPmehhOs1joQbnbCWqe a6RMsCzemtUTTGtXoycyVKKrapUbHNxpa2PqXza2tkmaVZGjNY4Icbvc65ah6Kc3SiiJ pJHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742471008; x=1743075808; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f2Wsg5VIB8ZYQ7dLZC24XedHI71P1kTIO9l0VEpsJkA=; b=rMbsqtj7A2WIYfIqcr8KTn5USt7ci2l3+j6rBE0on5w5U2320JtlxmlBRFWN1DrqFj wNWm23zqg5arV+bgd1wCB303gN/ort1RqHPUVmMp8NijSG9RFa+qVXJyoPN1zfIR3oq9 /I5ohloUZV61p0nJ6pDzFzgRgeurlVazdBXIvVZcJu4JywpJQLcRI4CiR2pMuPnIpyLH UUzKfLmp7REAIWMd796fZc4fVP3rOKkfewe+fLu4O7+sFWG8WGYBP9EG/QgDuzjR806a QTdDvW+/lW9FVA3YXSvCOvP/BYOqqoTgj98OrLAn5kegJtxMEU/wEc6U2yGZFxabL47K 2lGA== X-Forwarded-Encrypted: i=1; AJvYcCX3A0yJcckagBmnAl6gwNN90DQycthb2nebH2OXpuD86fYfqKhzgFWUmfagxaNluj3bXYBm3g==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxie8x/dP7fpoY7IZScYOYaHV209lBHts1x6mEd231E3uqk6V/e kdYBGxT5TvE+PGUGpw4xOzvvO3xcBsHLlx8awM7sLoplN/zWZFBC X-Gm-Gg: ASbGnctxMvSvJBKvz9p4PlDXOvCfCYan+TyDmXrzQN61vyrfVoAiTvEEcUz2duIDhK6 lHrJJBdfYWJ9MV0vFcgnNAxDKhXDhwSJWMorgZP0z0YOYpMa+Rn1bCy2y5zVnnmdXC0RHrSnToN SaSfRqFOlhNyUAKJ8PbtHsdI9nt52nPH46n/PbkZQwWBLSUywpII0yaZeUQu0GCqT5oU1rSTpmJ Olqog3h4pMvMLKX/fzG4nOqWnROzdgzXU9VEkMGPhYINjOtlTFHziHP4YJabgFqjMQjjlNvJUgL qm4SXIDn22l6Su6DzIwrnC95t1Dymm+QnTzi/bSzjhOhgtfY26VllnyNbl9XhnUBzKNsuyO0ovC ztb5z723ZJA== X-Google-Smtp-Source: AGHT+IGWwqyDeQIW2JDtv9HRNtmoFGVO1HD0XMcaM6iGya5mdopEVHVSKG92qpydciF7ZyCXQxrP5Q== X-Received: by 2002:a05:6a00:3a25:b0:736:4644:86e6 with SMTP id d2e1a72fcca58-7376d62c910mr9317110b3a.12.1742471007932; Thu, 20 Mar 2025 04:43:27 -0700 (PDT) Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-737116955d0sm13911167b3a.138.2025.03.20.04.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Mar 2025 04:43:27 -0700 (PDT) Date: Thu, 20 Mar 2025 20:43:26 +0900 Message-ID: From: kobarity To: Mattias =?ISO-8859-1?Q?Engdeg=E5rd?= , Eli Zaretskii Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python In-Reply-To: <86r03027wa.fsf@gnu.org> References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/31.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/mixed; boundary="Multipart_Thu_Mar_20_20:43:23_2025-1" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, Paul Eggert , garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Multipart_Thu_Mar_20_20:43:23_2025-1 Content-Type: text/plain; charset=US-ASCII Eli Zaretskii wrote: > > > Date: Fri, 14 Mar 2025 01:13:29 +0900 > > From: kobarity > > Cc: Garid Zorigoo , > > 76943@debbugs.gnu.org > > > > Eli Zaretskii wrote: > > > > > > > From: Garid Zorigoo > > > > Date: Thu, 13 Mar 2025 11:04:23 +0900 > > > > > > > > > > > > I found a work around, not sure how & why. > > > > Changing the value of comint-ptyp seems to make comint-interrupt-subjob work: > > > > > > > > (setq comint-ptyp nil) > > > > > > > > Hope this helps. > > > > > > > > I believe that inferior-python should be able to interrupt subjobs > > > > by default (i.e. without the user changing the above variable value). > > > > > > kobarity, any comments or suggestions? > > > > This turned out to be an effect of the setting to make the tty RAW, > > which Mattias and I did as part of #68559. > > > > (defconst python-shell-setup-code > > "\ > > try: > > import tty > > except ImportError: > > pass > > else: > > tty.setraw(0)" > > "Code used to setup the inferior Python processes.") > > > > This is to disable echo back on MacOS, so there is a workaround to > > limit this setting to MacOS only. That would not solve the > > `comint-interrupt-subjob' problem on MacOS, though. > > > > `comint-ptyp' is passed as the CURRENT-GROUP argument of > > `interrupt-process' function. It is finally processed by the > > process_send_signal function in process.c. If CURRENT-GROUP is > > non-nil, it first try to send the control character instead of sending > > the signal. However, I believe the control character is ignored > > because tty is set to RAW by the above code. > > > > I feel it would be better for process_send_signal to check if the tty > > is RAW, but I am not sure if that is appropriate. > > Paul, WDYT about this? > > > Since process_send_signal checks whether control characters such as > > VINTR are valid, we can also avoid this problem by disabling VINTR as > > follows. > > > > (defconst python-shell-setup-code > > "\ > > try: > > import tty > > import termios > > except ImportError: > > pass > > else: > > tty.setraw(0) > > attr = termios.tcgetattr(0) > > attr[-1][termios.VINTR] = b'\x00' > > termios.tcsetattr(0, termios.TCSANOW, attr)" > > "Code used to setup the inferior Python processes.") > > > > In summary, there are at least four possible options. > > > > 1. Set `comint-ptyp' to nil. > > 2. Improve process_send_signal to check if tty is RAW. > > 3. Disable VINTR in addition to making the tty RAW. > > 4. Do not set tty to RAW except on MacOS. > > > > If we choose 4, I believe MacOS requires one of 1-3. > > Thanks. > > Let's see what Paul thinks about this, and take it from there. I have been thinking about it some more too. > > 1. Set `comint-ptyp' to nil. This method does not seem to be a solution. `comint-ptyp' determines which process group to signal. For example, when `comint-ptyp' is t, the foreground process is interrupted instead of Python as follows. >>> import pty >>> pty.spawn("/bin/bash") $ sleep 10 sleep 10 C-c C-c^C $ However, when `comint-ptyp' is nil, the Python process is interrupted. >>> import pty >>> pty.spawn("/bin/bash") $ sleep 10 sleep 10 C-c C-cTraceback (most recent call last): File "", line 1, in File "/usr/lib/python3.12/pty.py", line 205, in spawn _copy(master_fd, master_read, stdin_read) File "/usr/lib/python3.12/pty.py", line 133, in _copy _copy(master_fd, master_read=master_read, stdin_read=stdin_read) File "/usr/lib/python3.12/pty.py", line 155, in _copy rfds, wfds, _xfds = select(rfds, wfds, []) ^^^^^^^^^^^^^^^^^^^^^^ KeyboardInterrupt >>> So I think the interrupt should work whether `comint-ptyp' is t or nil. > > 2. Improve process_send_signal to check if tty is RAW. More precisely, it would be better to check ISIG of c_lflag. However, it may be difficult to change the behavior for compatibility with previous behavior. > > 3. Disable VINTR in addition to making the tty RAW. Another option is to disable echo back only instead of making the tty raw. As I mentioned in my earlier mail, `python-shell-setup-code' is for disabling echo back in MacOS. Echo back must be disabled for completion to work, but it is not necessary to make the tty raw. The attached patch is to disable echo back only. Python on Windows is not affected by this patch because there is no termios module. Mattias, could you try this patch on MacOS and confirm that completion works and that ERTs pass? --Multipart_Thu_Mar_20_20:43:23_2025-1 Content-Type: application/octet-stream; type=patch; name="0001-Disable-echo-back-instead-of-setting-tty-to-raw-in-I.patch" Content-Disposition: attachment; filename="0001-Disable-echo-back-instead-of-setting-tty-to-raw-in-I.patch" Content-Transfer-Encoding: 7bit >From 53845a94e233ccc08764fe1e1c65beae61c0ffcd Mon Sep 17 00:00:00 2001 From: kobarity Date: Thu, 20 Mar 2025 19:03:33 +0900 Subject: [PATCH] Disable echo back instead of setting tty to raw in Inferior Python * lisp/progmodes/python.el (python-shell-setup-code): Change the Python setup code. (Bug#76943) --- lisp/progmodes/python.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 741b94e187b..42a6b61faee 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3557,11 +3557,13 @@ python-shell-first-prompt-hook (defconst python-shell-setup-code "\ try: - import tty + import termios except ImportError: pass else: - tty.setraw(0)" + attr = termios.tcgetattr(0) + attr[3] &= ~termios.ECHO + termios.tcsetattr(0, termios.TCSADRAIN, attr)" "Code used to setup the inferior Python processes.") (defconst python-shell-eval-setup-code -- 2.43.0 --Multipart_Thu_Mar_20_20:43:23_2025-1-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 20 09:09:40 2025 Received: (at 76943) by debbugs.gnu.org; 20 Mar 2025 13:09:40 +0000 Received: from localhost ([127.0.0.1]:56104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvFeW-0005Jv-8o for submit@debbugs.gnu.org; Thu, 20 Mar 2025 09:09:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56466) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvFeU-0005Je-2N for 76943@debbugs.gnu.org; Thu, 20 Mar 2025 09:09:38 -0400 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 1tvFeN-0004gP-Nt; Thu, 20 Mar 2025 09:09:31 -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=1LYxSKRkVCrksG28yM+0onPVzb2PbL9NZux5gZGZBBM=; b=ajYOfihqHQKA pwxet/T7SQNUjit+V1ICg81LuJd4zhrbKjfeond/6i4DW6ZblgyCD68NkikmKZ3B6fuvVRiYXpjUr 2BL7BPhT8oJGvyy6Nb4i8IlmtR3WYMhhYhhjJwmuvn1tQsVEiwOp0Ot7uE9jpFkQRr2AGME3lbTtW C5HISGYV56/PeOL61eU4Ma9etzdUP6QmoP4Ad38G7WuOiieudu8kSAv6gPXB8ZHKUIVeN2be1NQyF iB4yoX1oJRjwDji1LfzmG3PacVGFVx9VyWi9TAOt5T/ZmQT39Qkhd3LGG4AzSD5YMssRcYbZs9f9B RmfUwj1JPjZR9zfMzlw6sg==; Date: Thu, 20 Mar 2025 15:09:27 +0200 Message-Id: <86ldszn914.fsf@gnu.org> From: Eli Zaretskii To: eggert@cs.ucla.edu In-Reply-To: <86r03027wa.fsf@gnu.org> (message from Eli Zaretskii on Thu, 13 Mar 2025 18:49:09 +0200) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, kobarity@gmail.com, mattias.engdegard@gmail.com, garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Paul, could you please chime in? > Cc: 76943@debbugs.gnu.org, mattias.engdegard@gmail.com, garidzorigoo@gmail.com > Date: Thu, 13 Mar 2025 18:49:09 +0200 > From: Eli Zaretskii > > > Date: Fri, 14 Mar 2025 01:13:29 +0900 > > From: kobarity > > Cc: Garid Zorigoo , > > 76943@debbugs.gnu.org > > > > Eli Zaretskii wrote: > > > > > > > From: Garid Zorigoo > > > > Date: Thu, 13 Mar 2025 11:04:23 +0900 > > > > > > > > > > > > I found a work around, not sure how & why. > > > > Changing the value of comint-ptyp seems to make comint-interrupt-subjob work: > > > > > > > > (setq comint-ptyp nil) > > > > > > > > Hope this helps. > > > > > > > > I believe that inferior-python should be able to interrupt subjobs > > > > by default (i.e. without the user changing the above variable value). > > > > > > kobarity, any comments or suggestions? > > > > This turned out to be an effect of the setting to make the tty RAW, > > which Mattias and I did as part of #68559. > > > > (defconst python-shell-setup-code > > "\ > > try: > > import tty > > except ImportError: > > pass > > else: > > tty.setraw(0)" > > "Code used to setup the inferior Python processes.") > > > > This is to disable echo back on MacOS, so there is a workaround to > > limit this setting to MacOS only. That would not solve the > > `comint-interrupt-subjob' problem on MacOS, though. > > > > `comint-ptyp' is passed as the CURRENT-GROUP argument of > > `interrupt-process' function. It is finally processed by the > > process_send_signal function in process.c. If CURRENT-GROUP is > > non-nil, it first try to send the control character instead of sending > > the signal. However, I believe the control character is ignored > > because tty is set to RAW by the above code. > > > > I feel it would be better for process_send_signal to check if the tty > > is RAW, but I am not sure if that is appropriate. > > Paul, WDYT about this? > > > Since process_send_signal checks whether control characters such as > > VINTR are valid, we can also avoid this problem by disabling VINTR as > > follows. > > > > (defconst python-shell-setup-code > > "\ > > try: > > import tty > > import termios > > except ImportError: > > pass > > else: > > tty.setraw(0) > > attr = termios.tcgetattr(0) > > attr[-1][termios.VINTR] = b'\x00' > > termios.tcsetattr(0, termios.TCSANOW, attr)" > > "Code used to setup the inferior Python processes.") > > > > In summary, there are at least four possible options. > > > > 1. Set `comint-ptyp' to nil. > > 2. Improve process_send_signal to check if tty is RAW. > > 3. Disable VINTR in addition to making the tty RAW. > > 4. Do not set tty to RAW except on MacOS. > > > > If we choose 4, I believe MacOS requires one of 1-3. > > Thanks. > > Let's see what Paul thinks about this, and take it from there. > > > > From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 20 12:16:38 2025 Received: (at 76943) by debbugs.gnu.org; 20 Mar 2025 16:16:38 +0000 Received: from localhost ([127.0.0.1]:58629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvIZR-0001UY-Hi for submit@debbugs.gnu.org; Thu, 20 Mar 2025 12:16:38 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:42914) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvIZK-0001UC-Rj for 76943@debbugs.gnu.org; Thu, 20 Mar 2025 12:16:34 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 3BA693C01084D; Thu, 20 Mar 2025 09:16:24 -0700 (PDT) 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 0NgkwwKbK_si; Thu, 20 Mar 2025 09:16:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 00D023C01084E; Thu, 20 Mar 2025 09:16:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 00D023C01084E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1742487384; bh=ZqhW2NbKOJN4H1+wQE7zNuUHsqk2izG00FaMgpk1QGY=; h=Message-ID:Date:MIME-Version:To:From; b=JFJklvorZUoVHYLPzuYUmHX8p46krXyddm5Uh8uohwIQ7blvgRqdt2rfI70ABRyue cuS8USCZ63l2xBQQYUF6ABuTt6IDuu0cNTVAHCDFppGQIUNMcl6qhfn1KMv+mB2HmY 5fv9/VUj7RQW12UTXLN9A710m4Vz7E0d8/Cuo4DESNZIQC15PSd2lkpFqrSgEBIfej uyU09QI744A7Nz94FH9vKdD/erj7atXjoUnSTGlHzUI7j+Hpu9oGN/0T+kRP2H/dPh PvDyTawi2pqxzUmD4TuXPmPkwlmOxiCKv0NX18sT35SnMYFWjd11SjoRSo3hm9+DJg 3PaPjeNL0dgTQ== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 CBFoHCXoyVGS; Thu, 20 Mar 2025 09:16:23 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.147.225.25]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id CA52C3C01084D; Thu, 20 Mar 2025 09:16:23 -0700 (PDT) Message-ID: <3a698328-5307-4527-8026-f742500f3e7d@cs.ucla.edu> Date: Thu, 20 Mar 2025 09:16:22 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python To: Eli Zaretskii References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> <86ldszn914.fsf@gnu.org> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <86ldszn914.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, kobarity@gmail.com, mattias.engdegard@gmail.com, garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2025-03-20 06:09, Eli Zaretskii wrote: > Ping! Paul, could you please chime in? I don't have any opinion on this. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 05 04:30:18 2025 Received: (at 76943) by debbugs.gnu.org; 5 Apr 2025 08:30:18 +0000 Received: from localhost ([127.0.0.1]:41414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0yus-0004kw-I0 for submit@debbugs.gnu.org; Sat, 05 Apr 2025 04:30:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37362) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0yup-0004gS-Tb for 76943@debbugs.gnu.org; Sat, 05 Apr 2025 04:30:12 -0400 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 1u0yuj-0003Bw-Dm; Sat, 05 Apr 2025 04:30:05 -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=4LIM7pMImhJFh30tYlDBhkE2Y6PBU34vOIH+QAmqRr4=; b=LvTW3GAh8lQh MJjr2nRJE+FsC71XJh5g9yHW9kCP/4qs25WTQt64634Ejqe7tP07dqozKvmf7+1X+yN5hqy4IwYeA UJR4my6VNAQA5TlqxWJTg+6XgyjFkKAaWujCOifF6nsaXiMW2kp6al8I6yhy82m+BMm0uUbIbhxTc RsLRfP5Fd2I7I4tP/p4ovDLgROvcuFnGB5CS4MmCdA7ZZPat7fgr49vqrfhCY8NSxKTPhkgq9t6u0 FDcfinLo6IreVo24X7NeNxZ95IEkog0Gv1XJ6y3kqIyYv925wFWiEnlqDYwtXotSgpVU0KQFQmDFO 1NeEqEuSNZH6rhoMU0cMhQ==; Date: Sat, 05 Apr 2025 11:30:02 +0300 Message-Id: <86ecy7xb79.fsf@gnu.org> From: Eli Zaretskii To: mattias.engdegard@gmail.com, kobarity In-Reply-To: (message from kobarity on Thu, 20 Mar 2025 20:43:26 +0900) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, eggert@cs.ucla.edu, garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Mattias, could you please try the proposed patch? > Date: Thu, 20 Mar 2025 20:43:26 +0900 > From: kobarity > Cc: Paul Eggert , > garidzorigoo@gmail.com, > 76943@debbugs.gnu.org > > Eli Zaretskii wrote: > > > > > Date: Fri, 14 Mar 2025 01:13:29 +0900 > > > From: kobarity > > > Cc: Garid Zorigoo , > > > 76943@debbugs.gnu.org > > > > > > Eli Zaretskii wrote: > > > > > > > > > From: Garid Zorigoo > > > > > Date: Thu, 13 Mar 2025 11:04:23 +0900 > > > > > > > > > > > > > > > I found a work around, not sure how & why. > > > > > Changing the value of comint-ptyp seems to make comint-interrupt-subjob work: > > > > > > > > > > (setq comint-ptyp nil) > > > > > > > > > > Hope this helps. > > > > > > > > > > I believe that inferior-python should be able to interrupt subjobs > > > > > by default (i.e. without the user changing the above variable value). > > > > > > > > kobarity, any comments or suggestions? > > > > > > This turned out to be an effect of the setting to make the tty RAW, > > > which Mattias and I did as part of #68559. > > > > > > (defconst python-shell-setup-code > > > "\ > > > try: > > > import tty > > > except ImportError: > > > pass > > > else: > > > tty.setraw(0)" > > > "Code used to setup the inferior Python processes.") > > > > > > This is to disable echo back on MacOS, so there is a workaround to > > > limit this setting to MacOS only. That would not solve the > > > `comint-interrupt-subjob' problem on MacOS, though. > > > > > > `comint-ptyp' is passed as the CURRENT-GROUP argument of > > > `interrupt-process' function. It is finally processed by the > > > process_send_signal function in process.c. If CURRENT-GROUP is > > > non-nil, it first try to send the control character instead of sending > > > the signal. However, I believe the control character is ignored > > > because tty is set to RAW by the above code. > > > > > > I feel it would be better for process_send_signal to check if the tty > > > is RAW, but I am not sure if that is appropriate. > > > > Paul, WDYT about this? > > > > > Since process_send_signal checks whether control characters such as > > > VINTR are valid, we can also avoid this problem by disabling VINTR as > > > follows. > > > > > > (defconst python-shell-setup-code > > > "\ > > > try: > > > import tty > > > import termios > > > except ImportError: > > > pass > > > else: > > > tty.setraw(0) > > > attr = termios.tcgetattr(0) > > > attr[-1][termios.VINTR] = b'\x00' > > > termios.tcsetattr(0, termios.TCSANOW, attr)" > > > "Code used to setup the inferior Python processes.") > > > > > > In summary, there are at least four possible options. > > > > > > 1. Set `comint-ptyp' to nil. > > > 2. Improve process_send_signal to check if tty is RAW. > > > 3. Disable VINTR in addition to making the tty RAW. > > > 4. Do not set tty to RAW except on MacOS. > > > > > > If we choose 4, I believe MacOS requires one of 1-3. > > > > Thanks. > > > > Let's see what Paul thinks about this, and take it from there. > > I have been thinking about it some more too. > > > > 1. Set `comint-ptyp' to nil. > > This method does not seem to be a solution. `comint-ptyp' determines > which process group to signal. For example, when `comint-ptyp' is t, > the foreground process is interrupted instead of Python as follows. > > >>> import pty > >>> pty.spawn("/bin/bash") > $ sleep 10 > sleep 10 > C-c C-c^C > $ > > However, when `comint-ptyp' is nil, the Python process is interrupted. > > >>> import pty > >>> pty.spawn("/bin/bash") > $ sleep 10 > sleep 10 > C-c C-cTraceback (most recent call last): > File "", line 1, in > File "/usr/lib/python3.12/pty.py", line 205, in spawn > _copy(master_fd, master_read, stdin_read) > File "/usr/lib/python3.12/pty.py", line 133, in _copy > _copy(master_fd, master_read=master_read, stdin_read=stdin_read) > File "/usr/lib/python3.12/pty.py", line 155, in _copy > rfds, wfds, _xfds = select(rfds, wfds, []) > ^^^^^^^^^^^^^^^^^^^^^^ > KeyboardInterrupt > >>> > > So I think the interrupt should work whether `comint-ptyp' is t or > nil. > > > > 2. Improve process_send_signal to check if tty is RAW. > > More precisely, it would be better to check ISIG of c_lflag. However, > it may be difficult to change the behavior for compatibility with > previous behavior. > > > > 3. Disable VINTR in addition to making the tty RAW. > > Another option is to disable echo back only instead of making the tty > raw. As I mentioned in my earlier mail, `python-shell-setup-code' is > for disabling echo back in MacOS. Echo back must be disabled for > completion to work, but it is not necessary to make the tty raw. The > attached patch is to disable echo back only. Python on Windows is not > affected by this patch because there is no termios module. > > Mattias, could you try this patch on MacOS and confirm that completion > works and that ERTs pass? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 17 08:59:41 2025 Received: (at 76943-done) by debbugs.gnu.org; 17 Apr 2025 12:59:41 +0000 Received: from localhost ([127.0.0.1]:46173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5OqC-0004Dd-V1 for submit@debbugs.gnu.org; Thu, 17 Apr 2025 08:59:41 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:59776) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5OqA-0004Cp-2f for 76943-done@debbugs.gnu.org; Thu, 17 Apr 2025 08:59:39 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-30f30200b51so8180521fa.3 for <76943-done@debbugs.gnu.org>; Thu, 17 Apr 2025 05:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744894771; x=1745499571; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=YI1T+Nxx1sUlCobGzj9/sGvc1P3Q8DqC1FcGcvPYYU4=; b=a417fjE42N/0sJVGxQBt7JxVnjTfz0dBeiUm2WehChBvrlwZW/yZ+Oi2UH1dHeAKmh zrHo+y9bDKw4lzynpCMKG94ng0KYMCNLLsfCesiM3ATm2g+3sTJQHHFtk4D6Exm/HGJE l/On/bldY5rN4Ujla0+s0W3l04EKzTejxuyMeUPexIOtUMpYgCVQZSrsjKW4vw52gC+f mMw7ZImY5ySqXBNmhDGVNufuQCLNWF2EyI00HCyBwGzGQdWWr5poeivQ7i/jcla5ruiU B2GkJOXDWz3oI9JxPxoeSOuUs8rC4jDnTONMxSHgMLcW6SYbpw7K2OL1mCqVJxOWWcU+ Dohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744894771; x=1745499571; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YI1T+Nxx1sUlCobGzj9/sGvc1P3Q8DqC1FcGcvPYYU4=; b=JRwhZSf1id73GjH+pBfOyPDvmKDCCpYJKwh+lOWqqayrA1++mZUVqsPTYsjrtQIYTR wRivsnMCNrfMxJHhrGOtgCmQhU4Jpu+wmDrEeKMEeRX19CQ8sum1l6EXgCpzDCmuHFAY Esg7U40d8B0qyNnNAdH29NLtAsu+nLj4tQGwT5CCbbi9ifaR6dgXidopYi8P/sp99Fxh G09M0Yu+mvA4GCiZsCJa/W+78xrFxmPw7dPnN2hFDi07i9RU/Q7NhYYzWIQ0q75kVGEe 1mCf/8QDxC9rq4iGKgZ96wg4gpzDsQPi2cKGMOCi+ZL6Hk7JA7pA8uphyKwVB6tjQlqA o53A== X-Forwarded-Encrypted: i=1; AJvYcCX/kvk4njp3drqMjDNY8OLVeD3sgJEIsub4imBCoLfx6pN7MGzsAiyN0bRLPGwPqOEoDzKDOURUW3ii@debbugs.gnu.org X-Gm-Message-State: AOJu0YzVY89nxRnqkW7rNPT25Mg61YWNbxqZVLWGUvzT9Fml8ZvQXzzG BPuLjPFuQXql7JORu6CgYPDNcn3G12uyza0XSAKtSV6lYpmMvc1b X-Gm-Gg: ASbGncsrrH4l0DHSPX5XQqGbzVpvUdxddy+OAWKM9LPw4kb1gFhEw2x/E+JotrtHpJ5 ub7U1HZdHE3+XApxZoRr0jJCKVO2EmDjy5YAac+sFxFMk55NH7fOJdi4RQjors6VUNIHksZKG1T dN7+UXmfXwTVVog2FPYrIvTrprnXkZJNi0KvVL1IwFMYir8jrZMBNejaLDBjf2RoD4bRzj26ZuX NlGpooUi3QSHiQuH62ZfeCZlGbZlak1fHyAShAdiBTCHFlkjz9LjB4ZMxzxodt/TdgPUmaWqyFF f6P+NZMyhtzIsxLrj1J+7wxRt8lQKIaXZsYYz3laiaVNjA4CWpRGXwgOGhs92PVx0dllq8cYdgz qck/H3SoO6nvhAZdO8LFYEWSyEJleBv4= X-Google-Smtp-Source: AGHT+IGvTvPnbz88i2EFiQISgFsBz4ntdsBQXoZzL9hCq6vLH1g4TNaZCc0Vas6Q19Z5Mht2BiWUlw== X-Received: by 2002:a2e:bcc9:0:b0:30b:c6fe:4530 with SMTP id 38308e7fff4ca-3107f68a9d5mr28890601fa.3.1744894771280; Thu, 17 Apr 2025 05:59:31 -0700 (PDT) Received: from smtpclient.apple (c188-150-186-155.bredband.tele2.se. [188.150.186.155]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f464ea80bsm27450581fa.63.2025.04.17.05.59.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2025 05:59:30 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 17 Apr 2025 14:59:30 +0200 Content-Transfer-Encoding: 7bit Message-Id: <5D94BB83-D390-4F8E-B300-F3944F243B6E@gmail.com> References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> To: kobarity X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943-done Cc: 76943-done@debbugs.gnu.org, Eli Zaretskii , Paul Eggert , garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 20 mars 2025 kl. 12.43 skrev kobarity : > Mattias, could you try this patch on MacOS and confirm that completion > works and that ERTs pass? > <0001-Disable-echo-back-instead-of-setting-tty-to-raw-in-I.patch> Sorry about the delay; been away and have again a backlog to work through. Thank you for the patch -- it makes sense and all seems to work. Now pushed to master, and I assume the bug can be closed. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 17 11:02:41 2025 Received: (at 76943-done) by debbugs.gnu.org; 17 Apr 2025 15:02:41 +0000 Received: from localhost ([127.0.0.1]:48088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5QlF-0000xg-4p for submit@debbugs.gnu.org; Thu, 17 Apr 2025 11:02:41 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:46095) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5Qka-0000sj-0E for 76943-done@debbugs.gnu.org; Thu, 17 Apr 2025 11:02:00 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-739b3fe7ce8so822823b3a.0 for <76943-done@debbugs.gnu.org>; Thu, 17 Apr 2025 08:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744902114; x=1745506914; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=ScW9Xp+6JSxefK/mcElhTuiq/4RL2Ifom6rGaviNO8s=; b=VF/dmy88h4mhJhHeebqzktrOIdQR2t6MAxc4c0IdRq9jM+t4vivBALt5zTlkWrUDYV /LsGsuFk5o36401KZZoltwc56YIhDwF3NLmctCn+XmloRWdLKa/jSe0vGaVeVoqAYJcz SI5Rbj37G9Zh1lu7btP3JSQUw2tBdWvIQBV8dsLnYNQFQbHG5+Qa15DnaqyBK1EDXlNg jLz9oPn88gsgtcA8h1fiIcUO9YkUh7rWB/YfbBy3/Fo6rygdJdTv8pIZ+p24Yc8YbMj7 BXQosAEsHKQZnbxWDuZ9ZnVKtdnmNh1OodCTzJM9xv4Om+CwogW/vhboAtng6M/H4BCO hNoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744902114; x=1745506914; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ScW9Xp+6JSxefK/mcElhTuiq/4RL2Ifom6rGaviNO8s=; b=FOpkiegAS7ADh7CE0EHdd8J7neHkgIiPx0ZDT2dMlCly1QbRGV/g9AmJ0ApP/tjjZ4 0J+Nl+TEMVKBICrYKJ5A/lsztl5d0Du+5PjQ4Z4BY8aYl3StRfcelVdksmpjEhE5T0Js ISfdAb2io4Cau5fYieMA1BDUwA37R5wago46Pp7vViWICkQSYPm7mwIE3LWx/SnGnb+I NBFVlLv42fXg0yZUqi+iDC69s+HSOZUl7VdUWrikJaDFn1lzuWGMCGv2QuZ9x2laX/1Z PzBoPE7oJy+bSvEUUA+Ht5R6mYGM7kKUot0/iC1Nh5Gm0nwKOu7MXpUxpdO4NPJ6r38T Osuw== X-Forwarded-Encrypted: i=1; AJvYcCWFEXPkIys7BTroC4lZRRdVKiwSjABd0l1Xy6GkqZL7QIACsVEtK5DJbOkrBXz48CJvY4qWyQsm4yOX@debbugs.gnu.org X-Gm-Message-State: AOJu0YynzBjeG7d+ujbMBjGo6kWDpLXMA8cW2VRJzEQqYIoihYPpiW90 0YoSp+KNl4dKYhhuX6JpdhoU5315ep9hzXI4fBV/BucrfOSAIgo9 X-Gm-Gg: ASbGnctzL9BO3LcPsR+KFHQtx/Tg0tg2uycyxfehJLKenua6TOwyDSMhVHO/ykX7Lfh Kmt7oND9h0JA2RZbllKsQ9UMtx14hCVFhblsUgpRnHw1PBkFxKpjL5mo2wCTbhZdD+jw+IBjGsx bI0yb6y33OQDNcpYYL6wdNJajyoZf8LTjFFNHHeyfWwr7GOOzQwqpH/PlVPBfd4ZdLJTzQDhzMn Z0Zn6Rg9a8jE2WEfWNJBdskuxeMnUOnHVbdzLDLNxOF0OT90ljNLz2/k7TrPEdlZUvDpirWDZdN jw7vfYZ9ziUPhdSF/UrT7Hhu7AB/TNht8EGk5m1sMEaZMw0oguMB6fZ0QJiivYQiYN7uiFNv371 EWeTm+w== X-Google-Smtp-Source: AGHT+IFpOBPMhv3wogrDXloVyAMwxdXoxkKqpEQt0BreUp7lTug+kMjjTthVH7f9VOwskimsj1wfjA== X-Received: by 2002:a05:6a20:e188:b0:1f5:709d:e0cc with SMTP id adf61e73a8af0-203b400acc9mr10895461637.40.1744902113889; Thu, 17 Apr 2025 08:01:53 -0700 (PDT) Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b0b220cb94bsm3139312a12.31.2025.04.17.08.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 08:01:53 -0700 (PDT) Date: Fri, 18 Apr 2025 00:01:26 +0900 Message-ID: From: kobarity To: Mattias =?ISO-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python In-Reply-To: <5D94BB83-D390-4F8E-B300-F3944F243B6E@gmail.com> References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> <5D94BB83-D390-4F8E-B300-F3944F243B6E@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/31.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943-done Cc: 76943-done@debbugs.gnu.org, Eli Zaretskii , Paul Eggert , garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=E5rd wrote: >=20 > 20 mars 2025 kl. 12.43 skrev kobarity : >=20 > > Mattias, could you try this patch on MacOS and confirm that completion > > works and that ERTs pass? > > <0001-Disable-echo-back-instead-of-setting-tty-to-raw-in-I.patch> >=20 > Sorry about the delay; been away and have again a backlog to work through. >=20 > Thank you for the patch -- it makes sense and all seems to work. >=20 > Now pushed to master, and I assume the bug can be closed. Thanks. Shouldn't this apply to the emacs-30 branch? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 07:32:41 2025 Received: (at 76943) by debbugs.gnu.org; 18 Apr 2025 11:32:41 +0000 Received: from localhost ([127.0.0.1]:50358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5jxZ-0005EL-4B for submit@debbugs.gnu.org; Fri, 18 Apr 2025 07:32:41 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:60434) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5jxU-0005D9-29 for 76943@debbugs.gnu.org; Fri, 18 Apr 2025 07:32:39 -0400 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-310447fe59aso18295571fa.0 for <76943@debbugs.gnu.org>; Fri, 18 Apr 2025 04:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744975946; x=1745580746; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=Lehqi5m/cUMa/9SsjO8RpntYnhPpfIuToxgkffbbMKo=; b=Iv+4Z0PBGvQh9YNQwpg+Sf+bu3+BVE5EoWEmfXYkoNIHTSeZBBG1Iwk/CWt5C2dgJv 9gEr9T5biaedFdaYr8gZC29YQKv0NGzmDEu4kgCRmGSuSumUPDxLgUigpKF6rG4OJ5VT yvyX8OU8aqELbD+EB+nXnBMbDhxSbnxlWCa0Z9ApUbfEnT7VuD+HeYRswtEuIXoRZ11c pB8slg+teAGmSjRKDX8qhsOLPtHZ5JPWO+1nDW0n0S2BiBn31NF1ZwKbyxrh11Jpll0V e8/JF7V9eN383QhcZdz7A0c/COZw8d1j530ANVGJWMn/V9rYBn97+dD1m2L+MJeA7ZPw NmDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744975946; x=1745580746; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Lehqi5m/cUMa/9SsjO8RpntYnhPpfIuToxgkffbbMKo=; b=NYXygGZ+t2Kd8mPlSyBs3o7ClV6R+77qjI0QYUYUR9Xlx2QOBEl9xu0plmMraCvT8G YBjL5lMpTHzXLTLghrZlu3rHtfnNklgebzHgC2p66RZ+cBZYvKlLdfSJCtXUokuN88ru t8aXl7DxK+p/k/twfo610htm5LHg9Oyut8vvBAwQQEcsnh4QjkeM0yhyjGc627Wqm65r Nxw/v4OVAu/E+O3KqeqewO4M5rund84CIEkwNGA16PNsRUXKZ4pDDjH7BiBzQd59WEI0 GfjBitRcrCFuvhRm5NfSgW41Ri+GhH4FnrAb5czWoiCARMHczDbDhIpZu6x5nO4+d9jn yCsA== X-Forwarded-Encrypted: i=1; AJvYcCUsZ7eX3gcpHFP1hn/excAsHZlXkdjTLEINDHlrB8rC9Mk0DINpXAyyOlosJ2tC5CkVeT4VTg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy/1mg1TZpqThWl2HYF5bHg52002TtPSP3le8cpyCansnqI0r4A zisATyxOrm7CbdmfiD72MQHwdrGdqy2ePLsbaU9/5uZKtig4YRI2 X-Gm-Gg: ASbGncvZ7yLCozOz8zRIvA9NLGhp6V61y0lOomA2Lf6/+S9Qz/U2/TyKfZcFvBAYSr2 fXK8xfxwS3KMIAZRQF1cPLe2YFnaggryXSsrw8xNBsgkbglhH9q54Tk3IpigqjcJJdrCWUoQ68y gs7v1RMXBRk6zemApTNyASG0TkAE8kXRYcTHqDXpbb3rqnvTUYKauS65/7YG55huJ/g/MnViEi3 eJVGAzBFS7D3FRf7Y7lXgd8CaoIx80Ow4REkhEIlNKov7q85CU4vHZuFtwvAXEJlhkptNrO7glL oBfGYsCRUhwWlIKz3uvu5ZfMVr3fmAtyGWMLYIcoUAihRlIEBCZEsW2P1XSEWdeELS0egToZbk5 w3u//x/Tzhlx+B0xaR1ofkNgk6X+9FG/uARYnbxGiWg== X-Google-Smtp-Source: AGHT+IGHvgwgrCJEnmpg13F0o1Pc5QLui85FiIoDKy6MuSKwMam/2mUtByGMb6mWvif3sA8c59hvag== X-Received: by 2002:a2e:bc83:0:b0:30c:467f:cda2 with SMTP id 38308e7fff4ca-310904edd20mr6861261fa.10.1744975946163; Fri, 18 Apr 2025 04:32:26 -0700 (PDT) Received: from smtpclient.apple (c188-150-186-155.bredband.tele2.se. [188.150.186.155]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-310907838ebsm2019791fa.39.2025.04.18.04.32.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Apr 2025 04:32:25 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 18 Apr 2025 13:32:24 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <450BEA3B-B882-467F-9543-F878A7D636DD@gmail.com> References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> <5D94BB83-D390-4F8E-B300-F3944F243B6E@gmail.com> To: kobarity X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, Eli Zaretskii , Paul Eggert , garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 17 apr. 2025 kl. 17.01 skrev kobarity : > Shouldn't this apply to the emacs-30 branch? We rarely backport bug fixes but given that this may be a regression = from Emacs 29, perhaps you could convince Eli to make an exception. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 08:17:41 2025 Received: (at 76943) by debbugs.gnu.org; 18 Apr 2025 12:17:42 +0000 Received: from localhost ([127.0.0.1]:50525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5kf3-0004jL-KA for submit@debbugs.gnu.org; Fri, 18 Apr 2025 08:17:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43406) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u5kew-0004hC-Ho for 76943@debbugs.gnu.org; Fri, 18 Apr 2025 08:17:35 -0400 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 1u5kel-0002PY-Ld; Fri, 18 Apr 2025 08:17:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UslcTPGM3QM2ueHPT1+I1hZLTxX9lgXSUngs96sQG9M=; b=dZBRPeKeTErNeKzh9pZr 1PmTvvW7Pwo1tKbhxePOqaCXSZfha46L15dMpZzlcIxw4/F/ne7uo33jnWTnocE5iCraD2U32goFl bMwq7KZaIg3VwyaE1iQrIxXFdfRRA8BKUrvWcKMu/FU/vmbmosXNrz47e4cY6JOqPC/Fgp4jGu5+e 2KTO6LCDNLARw9jjef8hqFXqdfVArRU3qYaz245AtsfZjU0ZVgytgU/cYfgA4D99h4B+kDNR8sInc iIikZK3ezfVZOh+W+Yp8f3ksrs6cmwigq8agnoOF0WvGXrbAl3KCr0kqFGksdEWQs6IQnZkr4qiqx SqA5XEAmWeM4Zg==; Date: Fri, 18 Apr 2025 15:17:16 +0300 Message-Id: <86y0vxackz.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <450BEA3B-B882-467F-9543-F878A7D636DD@gmail.com> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 18 Apr 2025 13:32:24 +0200) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> <5D94BB83-D390-4F8E-B300-F3944F243B6E@gmail.com> <450BEA3B-B882-467F-9543-F878A7D636DD@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, kobarity@gmail.com, eggert@cs.ucla.edu, garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias EngdegÄrd > Date: Fri, 18 Apr 2025 13:32:24 +0200 > Cc: Eli Zaretskii , > Paul Eggert , > garidzorigoo@gmail.com, > 76943@debbugs.gnu.org > > 17 apr. 2025 kl. 17.01 skrev kobarity : > > > Shouldn't this apply to the emacs-30 branch? > > We rarely backport bug fixes but given that this may be a regression from Emacs 29, perhaps you could convince Eli to make an exception. I'm okay with backporting it, unless you think it could be unsafe. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 09:10:59 2025 Received: (at 76943) by debbugs.gnu.org; 18 Apr 2025 13:11:00 +0000 Received: from localhost ([127.0.0.1]:50636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5lUd-0006CR-V8 for submit@debbugs.gnu.org; Fri, 18 Apr 2025 09:10:59 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:53690) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5lUM-00067i-C0 for 76943@debbugs.gnu.org; Fri, 18 Apr 2025 09:10:43 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-549b159c84cso2332925e87.3 for <76943@debbugs.gnu.org>; Fri, 18 Apr 2025 06:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744981828; x=1745586628; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=gJZOPNrJY0HlC7hECOrJY+ECq1Rfo+madwO+QHEeBi8=; b=erw6wlpSbW6BEZ8b7FRHavdLsZ3/xYpvfAJX0ltEsSny2ql/F6RA/p9MVtkj1nACZT qPlXeyRwddwIiQ3133Fo25bnhlxOHRsKHEqOvJuVih4DCzWaW40pvxCEhRMtVq+qhvGN BXjKpmIm5Qpv8Rh2CRExvoVgFO//BpH+xDW9jpfRXL2Cht/2wkDBhSYh+1d0XlFy8TqG KjLGqMoelMnR9WfQ+KBkUQ+/ASva7HxAgAVBb/74pzs8pasm+kBxF7hOqKDD2xdBXB3n NYoOPeMN9Y0QUHuFvk+7lVjOnybbGS67NDHdfKSfUXwo46cZKIoMZq75X671+tCAZ78w a71g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744981828; x=1745586628; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gJZOPNrJY0HlC7hECOrJY+ECq1Rfo+madwO+QHEeBi8=; b=VT23gDbxb0frG2ZEj4p82Ckj/kKLwMipCOE4jAnREps5AGfqP/SlLGvi0D2mkbQSVP u0k/emfaY+70NvodxpDdhsvEJ2kn4Xs8K2vrVKtAgPXdaDoUQw1k0nGIC0gz/oUJU33j Esn2K/KcduLkESjbOrUEIjeo6K4d1Q1twsZRnmK7EdeqagI9alNlO9IMkNlCi8qnoTId Vm7vPhi9S0L3a3a4mpKOwblEXoc74Og+VNuoiYUA7VHhCfUTBYMS+sviyPR+dr61z26j qPrFr6a6oNPF7tBR8CHOHcWOgiC2NUYPfJ9BqOkiciswZ2eK4T3iHMfOhh/4jMz1MmEz XLbQ== X-Forwarded-Encrypted: i=1; AJvYcCWgr6hW2hjjy1MzBAKB4ZB28DdW4SGzshsvomouN6XSWdaVtor4JVIczE55KppUKzyxE5Cyig==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy8EVlp5fY+WJxGLEcazzm+XIbAQqnqsTTNRt7FHJTLcg0CWYPj gTZaUBZ2pSBsjRictmiwZFU6HJKxJzUZHYdGJIKs8MtBJy6MOf8H X-Gm-Gg: ASbGncvi2lNpEVa+DVY2N9VmDI5jgy3OTQEsdKdBFgt1YeDpc9eyY/DihDs8WZL4G1G jnjRMLyU4+V+UDP3zkZ6ZqHNur3WqzH036WTywGSwi7ELsRDHsxRisUGXVVmjD1kbK9uHOgwS1K 4MNtpqlVL+4Cizr26yprBa9AAvIdSL4BrF4VexNGbesHtmN59CoU1itt4XvuSzJoyDiyhzxP/q6 yxDZzKA3OO55thZas5ifOFeVbN+h8hC/WnGbUASzJkfa2Mea46kxBJFxoYEVsgWqhCH4QXQPWfZ W8xK+ElvVQnJV2tB0b8w771llp3AWOtGNVek576aK7XX7GiGUaS8dHwsmHWO2PXiBofUNLUs5Io rlkbq6rfvXW40fJegymvurG6ennmHioC8OaUhSY3W5g== X-Google-Smtp-Source: AGHT+IG0rVo4decp/XzItA6BdTC9NSLwi5S57rMEahZlYLKKKS4eys5ONxChegGmYB7BYC4KBNbFXA== X-Received: by 2002:a05:651c:3122:b0:30b:8e06:86a3 with SMTP id 38308e7fff4ca-310904eabeemr9767571fa.16.1744981827428; Fri, 18 Apr 2025 06:10:27 -0700 (PDT) Received: from smtpclient.apple (c188-150-186-155.bredband.tele2.se. [188.150.186.155]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3109075e927sm2316381fa.10.2025.04.18.06.10.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Apr 2025 06:10:27 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#76943: 30.1; comint-interrupt-subjob does not interrupt process in inferior-python From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <86y0vxackz.fsf@gnu.org> Date: Fri, 18 Apr 2025 15:10:26 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <86h63x4fhm.fsf@gnu.org> <86r03027wa.fsf@gnu.org> <5D94BB83-D390-4F8E-B300-F3944F243B6E@gmail.com> <450BEA3B-B882-467F-9543-F878A7D636DD@gmail.com> <86y0vxackz.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76943 Cc: 76943@debbugs.gnu.org, kobarity@gmail.com, eggert@cs.ucla.edu, garidzorigoo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 18 apr. 2025 kl. 14.17 skrev Eli Zaretskii : > I'm okay with backporting it, unless you think it could be unsafe. Thank you, it should be perfectly safe. Now back-ported to emacs-30. From unknown Sun Jun 22 04:22:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 17 May 2025 11:24:17 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator