From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29735@debbugs.gnu.org
Subject: bug#29735: 27.0.50; It must be possible to suspend all timers
Date: Sun, 17 Dec 2017 10:08:01 +0100 [thread overview]
Message-ID: <871sjt3eoe.fsf@gmx.de> (raw)
In-Reply-To: <837etmskvi.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Dec 2017 18:22:41 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> In Tramp's start-file-process implementations, there are code segments
>> which must be guaranteed not to be interrupted by timers.
>
> Can you explain why is that?
Tramp must handle several asynchronous processes in parallel for a given
remote host. The main process is the working horse, sending all the remote
commands for the several file operations, and interpreting the received
output. This is performed via the connection buffer *tramp/method host*.
When another asynchronous process is needed, for example due to the call
of `start-file-process', Tramp starts that asynchronous process calling
ssh (for example). After that, initialization happens, including
password handling, setting the remote shell, cd'ing to the working
directory, calling the indicated command, and so on. During that time,
Tramp is instructed to use another process buffer. See for example
`tramp-sh-handle-start-file-process', where you find the lines
;; Set the new process properties.
(tramp-set-connection-property v "process-name" name)
(tramp-set-connection-property v "process-buffer" buffer)
All further low level process communication functions use from now on
that process. Until the initialization work is done, and the settings
are set back:
(tramp-flush-connection-property v "process-name")
(tramp-flush-connection-property v "process-buffer"))))))
If during that time a timer starts, which wants to apply a regular file
operation (let's say `file-attributes'), the corresponding commands are
sent to the process related to the just started asynchronous process,
instead to the working horse *tramp/method host*. This fails, of
course. Therefore, the start of timers between the both code samples
must be suppressed.
Best regards, Michael.
next prev parent reply other threads:[~2017-12-17 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-16 15:31 bug#29735: 27.0.50; It must be possible to suspend all timers Michael Albinus
2017-12-16 16:22 ` Eli Zaretskii
2017-12-17 9:08 ` Michael Albinus [this message]
2017-12-17 15:24 ` Eli Zaretskii
2017-12-17 18:43 ` Michael Albinus
2017-12-19 15:58 ` Stefan Monnier
2017-12-19 18:47 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871sjt3eoe.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=29735@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.