unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: John Shahid <jvshahid@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 35506@debbugs.gnu.org
Subject: bug#35506: 27.0.50; Emacs hangs while interrupting tramp processes
Date: Sat, 04 May 2019 10:33:19 -0400	[thread overview]
Message-ID: <87zho2e1cg.fsf@gmail.com> (raw)
In-Reply-To: <875zqs7xe6.fsf@gmx.de>


Michael Albinus <michael.albinus@gmx.de> writes:

> John Shahid <jvshahid@gmail.com> writes:
>
> Hi John,

[...]

> Reading the Emacs manual again at (info "(elisp) Signals to Processes")
>
> --8<---------------cut here---------------start------------->8---
> If CURRENT-GROUP is ‘nil’, the signal is sent to the process 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
>      ‘interrupt-process’.  The arguments of the functions are the same
>      as for ‘interrupt-process’.  These functions are called in the
>      order of the list, until one of them returns non-‘nil’.  The
>      default function, which shall always be the last in this list, is
>      ‘internal-default-interrupt-process’.
>
>      This is the mechanism, how Tramp implements ‘interrupt-process’.
> --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 <vshahid@gmail.com>.
> 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





  reply	other threads:[~2019-05-04 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 17:06 bug#35506: 27.0.50; Emacs hangs while interrupting tramp processes John Shahid
     [not found] ` <handler.35506.B.155664402325068.ack@debbugs.gnu.org>
2019-04-30 17:28   ` bug#35506: Acknowledgement (27.0.50; Emacs hangs while interrupting tramp processes) John Shahid
2019-05-03  8:30 ` bug#35506: 27.0.50; Emacs hangs while interrupting tramp processes Michael Albinus
2019-05-04 14:33   ` John Shahid [this message]
2019-05-04 16:36     ` Michael Albinus
2019-05-04 17:44       ` John Shahid
2019-05-04 18:07         ` John Shahid
2019-05-14 18:19           ` Michael Albinus
2019-05-14 18:59             ` John Shahid
2019-05-15 14:32               ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87zho2e1cg.fsf@gmail.com \
    --to=jvshahid@gmail.com \
    --cc=35506@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).