GNU bug report logs - #29735
27.0.50; It must be possible to suspend all timers

Previous Next

Package: emacs;

Reported by: Michael Albinus <michael.albinus <at> gmx.de>

Date: Sat, 16 Dec 2017 15:32:02 UTC

Severity: wishlist

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29735 <at> 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
Eli Zaretskii <eliz <at> 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.




This bug report was last modified 7 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.