aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2017-12-16 10:47:06 +0100
committerMichael Albinus2017-12-16 10:47:06 +0100
commitf63d9f86b5688ac84ec6e7eecdbb6cac103dbcf2 (patch)
tree552540925fa6260413ac1d067b9bbc2f65e6fe00 /lisp
parent506270f9c80bf9bd7dad35a2f0aa6f477da6490b (diff)
downloademacs-f63d9f86b5688ac84ec6e7eecdbb6cac103dbcf2.tar.gz
emacs-f63d9f86b5688ac84ec6e7eecdbb6cac103dbcf2.zip
Suppress timers in Tramp operations
* lisp/net/tramp.el (tramp-accept-process-output): * lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-start-file-process): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process): Suppress timers. * test/lisp/net/tramp-tests.el (tramp-test41-asynchronous-requests): Use $REMOTE_PARALLEL_PROCESSES. Flush cache prior file operations. Add instrumentation messages.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-adb.el4
-rw-r--r--lisp/net/tramp-sh.el8
-rw-r--r--lisp/net/tramp-smb.el18
-rw-r--r--lisp/net/tramp.el4
4 files changed, 26 insertions, 8 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index d06031f1a67..c614acfa4db 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1037,7 +1037,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
1037 (or (null program) tramp-process-connection-type)) 1037 (or (null program) tramp-process-connection-type))
1038 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) 1038 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
1039 (name1 name) 1039 (name1 name)
1040 (i 0)) 1040 (i 0)
1041 ;; We do not want to run timers.
1042 timer-list timer-idle-list)
1041 1043
1042 (while (get-process name1) 1044 (while (get-process name1)
1043 ;; NAME must be unique as process name. 1045 ;; NAME must be unique as process name.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 361e4c3e300..96a0d849072 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2473,7 +2473,9 @@ The method used must be an out-of-band method."
2473 ;; The default directory must be remote. 2473 ;; The default directory must be remote.
2474 (let ((default-directory 2474 (let ((default-directory
2475 (file-name-directory (if t1 filename newname))) 2475 (file-name-directory (if t1 filename newname)))
2476 (process-environment (copy-sequence process-environment))) 2476 (process-environment (copy-sequence process-environment))
2477 ;; We do not want to run timers.
2478 timer-list timer-idle-list)
2477 ;; Set the transfer process properties. 2479 ;; Set the transfer process properties.
2478 (tramp-set-connection-property 2480 (tramp-set-connection-property
2479 v "process-name" (buffer-name (current-buffer))) 2481 v "process-name" (buffer-name (current-buffer)))
@@ -2894,7 +2896,9 @@ the result will be a local, non-Tramp, file name."
2894 ;; We do not want to raise an error when 2896 ;; We do not want to raise an error when
2895 ;; `start-file-process' has been started several times in 2897 ;; `start-file-process' has been started several times in
2896 ;; `eshell' and friends. 2898 ;; `eshell' and friends.
2897 (tramp-current-connection nil) 2899 tramp-current-connection
2900 ;; We do not want to run timers.
2901 timer-list timer-idle-list
2898 p) 2902 p)
2899 2903
2900 (while (get-process name1) 2904 (while (get-process name1)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index ec689aea15f..fee14df991e 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -457,7 +457,9 @@ pass to the OPERATION."
457 (expand-file-name 457 (expand-file-name
458 tramp-temp-name-prefix 458 tramp-temp-name-prefix
459 (tramp-compat-temporary-file-directory)))) 459 (tramp-compat-temporary-file-directory))))
460 (args (list (concat "//" host "/" share) "-E"))) 460 (args (list (concat "//" host "/" share) "-E"))
461 ;; We do not want to run timers.
462 timer-list timer-idle-list)
461 463
462 (if (not (zerop (length user))) 464 (if (not (zerop (length user)))
463 (setq args (append args (list "-U" user))) 465 (setq args (append args (list "-U" user)))
@@ -739,7 +741,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
739 (let* ((share (tramp-smb-get-share v)) 741 (let* ((share (tramp-smb-get-share v))
740 (localname (replace-regexp-in-string 742 (localname (replace-regexp-in-string
741 "\\\\" "/" (tramp-smb-get-localname v))) 743 "\\\\" "/" (tramp-smb-get-localname v)))
742 (args (list (concat "//" host "/" share) "-E"))) 744 (args (list (concat "//" host "/" share) "-E"))
745 ;; We do not want to run timers.
746 timer-list timer-idle-list)
743 747
744 (if (not (zerop (length user))) 748 (if (not (zerop (length user)))
745 (setq args (append args (list "-U" user))) 749 (setq args (append args (list "-U" user)))
@@ -1215,6 +1219,8 @@ component is used as the target of the symlink."
1215 (let* ((name (file-name-nondirectory program)) 1219 (let* ((name (file-name-nondirectory program))
1216 (name1 name) 1220 (name1 name)
1217 (i 0) 1221 (i 0)
1222 ;; We do not want to run timers.
1223 timer-list timer-idle-list
1218 input tmpinput outbuf command ret) 1224 input tmpinput outbuf command ret)
1219 1225
1220 ;; Determine input. 1226 ;; Determine input.
@@ -1391,7 +1397,9 @@ component is used as the target of the symlink."
1391 "\\\\" "/" (tramp-smb-get-localname v))) 1397 "\\\\" "/" (tramp-smb-get-localname v)))
1392 (args (list (concat "//" host "/" share) "-E" "-S" 1398 (args (list (concat "//" host "/" share) "-E" "-S"
1393 (replace-regexp-in-string 1399 (replace-regexp-in-string
1394 "\n" "," acl-string)))) 1400 "\n" "," acl-string)))
1401 ;; We do not want to run timers.
1402 timer-list timer-idle-list)
1395 1403
1396 (if (not (zerop (length user))) 1404 (if (not (zerop (length user)))
1397 (setq args (append args (list "-U" user))) 1405 (setq args (append args (list "-U" user)))
@@ -1471,7 +1479,9 @@ component is used as the target of the symlink."
1471 (command (mapconcat 'identity (cons program args) " ")) 1479 (command (mapconcat 'identity (cons program args) " "))
1472 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) 1480 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
1473 (name1 name) 1481 (name1 name)
1474 (i 0)) 1482 (i 0)
1483 ;; We do not want to run timers.
1484 timer-list timer-idle-list)
1475 (unwind-protect 1485 (unwind-protect
1476 (save-excursion 1486 (save-excursion
1477 (save-restriction 1487 (save-restriction
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 3129984afc6..01a3e44c73e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3833,7 +3833,9 @@ connection buffer."
3833This is needed in order to hide `last-coding-system-used', which is set 3833This is needed in order to hide `last-coding-system-used', which is set
3834for process communication also." 3834for process communication also."
3835 (with-current-buffer (process-buffer proc) 3835 (with-current-buffer (process-buffer proc)
3836 (let (buffer-read-only last-coding-system-used) 3836 (let (buffer-read-only last-coding-system-used
3837 ;; We do not want to run timers.
3838 timer-list timer-idle-list)
3837 ;; Under Windows XP, `accept-process-output' doesn't return 3839 ;; Under Windows XP, `accept-process-output' doesn't return
3838 ;; sometimes. So we add an additional timeout. JUST-THIS-ONE 3840 ;; sometimes. So we add an additional timeout. JUST-THIS-ONE
3839 ;; is set due to Bug#12145. It is an integer, in order to avoid 3841 ;; is set due to Bug#12145. It is an integer, in order to avoid