From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John Shahid Newsgroups: gmane.emacs.bugs Subject: bug#35506: 27.0.50; Emacs hangs while interrupting tramp processes Date: Sat, 04 May 2019 10:33:19 -0400 Message-ID: <87zho2e1cg.fsf@gmail.com> References: <87y33rzalc.fsf@gmail.com> <875zqs7xe6.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="50611"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: 35506@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 04 16:34:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMvjw-000D3z-N6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 May 2019 16:34:12 +0200 Original-Received: from localhost ([127.0.0.1]:57410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMvjv-0003Sk-M5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 May 2019 10:34:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMvjn-0003SO-Ta for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 10:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMvjm-0004RO-S0 for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 10:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38396) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMvjm-0004RE-L7 for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 10:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMvjm-0007Ly-EF for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 10:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Shahid Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2019 14:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35506 X-GNU-PR-Package: emacs Original-Received: via spool by 35506-submit@debbugs.gnu.org id=B35506.155698041028228 (code B ref 35506); Sat, 04 May 2019 14:34:02 +0000 Original-Received: (at 35506) by debbugs.gnu.org; 4 May 2019 14:33:30 +0000 Original-Received: from localhost ([127.0.0.1]:51940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMvjF-0007LE-KE for submit@debbugs.gnu.org; Sat, 04 May 2019 10:33:29 -0400 Original-Received: from mail-qt1-f177.google.com ([209.85.160.177]:40872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMvjD-0007L0-IJ for 35506@debbugs.gnu.org; Sat, 04 May 2019 10:33:28 -0400 Original-Received: by mail-qt1-f177.google.com with SMTP id k24so6226321qtq.7 for <35506@debbugs.gnu.org>; Sat, 04 May 2019 07:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=S939x99wVc8ANjkNtj1ywdAyY50h/Txl5+FH0RoIAC4=; b=oBPpa0pvJBIsVczQWuBiOuQdzWAIP2966mh/wM78xzDwvwcSO+93ZzkhM1ZiAbi0qe MSeaCSOe4v5TYU4Uqq/LG7QG15yS/i1e5hmukXVthF94h8gzXvhi7o3VgIfv+LZNAc5T 9sNv2IoIjphVIPRJAwo+eoY/4/BdeMnukCKBWqXE6BT+GwlGXF0l6jESMLyoFXyRI2hr Rv1Qhpi5HodZss9Gu3LPJKf8BVQYchszFbvCV2gshXNAsYOvGVg7aNqnQ9RSSfYlDL9q /java2kfrz8xeuX85H4/OvK4VZxjQC7M1Bxj4OQqhkRKo6u0Rd8iNduU8Waw3SqwSUJ5 YFfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=S939x99wVc8ANjkNtj1ywdAyY50h/Txl5+FH0RoIAC4=; b=CyPKLDctVHmgrJq+9wNKqv2WftVTFN4+PCh/Z3QAiVhUldFI3VqcHU0xX/AMNvONZR RTsG5rUVwGDWe93kId3HbMoPn1pwCYINhzrarjimGxAkb4xQTfkeOaC4JCSESm10oZ2H oynjefdvtgVS2Pv+AuRz0I/xCPBUqQq83R1fnm6qevRCWb5Kgm1+qvsUudeWsNGc/MGR q8st7y4rTqDgvMoqxqHTDfvG4Vs3WFu4NoW+BsTpLMbPEx3N3RDkt4oVbAfo322BhdQx Ifvcv82SizhkZkW2ZGpTeg/YfOZW2TnDkzEdXmsdbPup1W/+V38xPvE02S9xLAGASm0X AF/A== X-Gm-Message-State: APjAAAUuCYX5y/T7dsIaUIFHePaFgGQKkfihcmqMW7czI0BRpzogTtTD Z/TTYJtMK9BjlKMuhj/3oCrAwteC X-Google-Smtp-Source: APXvYqxGc4CEFUKfvjNYazZqdOSec9tfcnRArxpNZHlNnBa/jhuit4RdkS4FOLawOtzaaklN+UAzbQ== X-Received: by 2002:ac8:25bd:: with SMTP id e58mr14198771qte.273.1556980401518; Sat, 04 May 2019 07:33:21 -0700 (PDT) Original-Received: from amun (cpe-104-162-85-46.nyc.res.rr.com. [104.162.85.46]) by smtp.gmail.com with ESMTPSA id h30sm7209187qth.49.2019.05.04.07.33.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 May 2019 07:33:20 -0700 (PDT) In-reply-to: <875zqs7xe6.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158742 Archived-At: Michael Albinus writes: > John Shahid writes: > > Hi John, [...] > Reading the Emacs manual again at (info "(elisp) Signals to Processes") > > --8<---------------cut here---------------start------------->8--- > If CURRENT-GROUP is =E2=80=98nil=E2=80=99, the signal is sent to the proc= ess group of > the immediate subprocess of Emacs. > --8<---------------cut here---------------end--------------->8--- > > So your patch is correct, pls push. Thanks for reviewing the patch. Unfortunately, I don't have push access to the repository. Do you mind pushing the patch for me? [...] > No, Tramp must report success. See the Emacs manual, same location as > above: > > --8<---------------cut here---------------start------------->8--- > -- Variable: interrupt-process-functions > This variable is a list of functions to be called for > =E2=80=98interrupt-process=E2=80=99. The arguments of the functions= are the same > as for =E2=80=98interrupt-process=E2=80=99. These functions are cal= led in the > order of the list, until one of them returns non-=E2=80=98nil=E2=80= =99. The > default function, which shall always be the last in this list, is > =E2=80=98internal-default-interrupt-process=E2=80=99. > > This is the mechanism, how Tramp implements =E2=80=98interrupt-proce= ss=E2=80=99. > --8<---------------cut here---------------end--------------->8--- I just realized that I made an unintentional change. I got rid of the return value, so the function will always return nil causing `interrupt-process' to fallback to the default implementation. That was not my intention. I think what I meant to do is to: 1. Asynchronously kill the process (the first patch) 2. Always return success, e.g. return proc. It doesn't make sense to use the default interrupt function for remote processes anyway, so always succeeding seems like the right thing to do here. This begs the question, why do we have to wait for the process output at all? > So we must investigate, why `interrupt-process' does not return in > your case. That is a good point. I didn't look deeply into why the `with-timeout' isn't timing out in my case. I will try to understand what is going on in the next few days. > Best regards, Michael. > > PS: In the FSF list, your email address is given as . > Looks like a typo, maybe you contact the FSF clerk about. Thanks for letting me know. No one brought this up before. I will follow up with the FSF clerk. Cheers, JS