emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tramp and timers


From: Michael Albinus
Subject: Tramp and timers
Date: Fri, 11 Dec 2020 17:58:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi,

Tramp is plagued since ever with timers, which run while Tramp is
performing accept-process-output. If such a timer runs an operation
which includes also a remote file operation, it ruins Tramp's current
process handling. See the discussion at
<https://lists.gnu.org/archive/html/tramp-devel/2020-12/msg00003.html>
for a recent problem.

In order to fix this, I plan to push a patch, which let Tramp detect
this kind of situation. If Tramp is performing an atomic process
operation (process-send-string / accept-process-output sequence), it
creates an internal lock. If another remote file operation tries to
perform a similar atomic process operation, while Tramp is locked, an
error will be raised.

This should happen only for remote file operations called from
timers. It does not worsen the current situation; instead of blocking
whole Emacs we'll get an error which can be handled. The timer is
cancelled, but the normal Emacs operations still continue.

(Maybe there are similar problems with process sentinels, but I do not
recall a respective bug report)

People writing timer functions shall care, at least by wrapping such
calls with ignore-errors. Currently, a file-error is raised, but we
could also introduce a new error symbol.

Comments?

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]