Function: tramp-call-process
tramp-call-process is a byte-compiled function defined in tramp.el.gz.
Signature
(tramp-call-process VEC PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS)
Documentation
Call call-process on the local host.
It always returns a return code. The Lisp error raised when PROGRAM is nil is trapped also, returning 1. Furthermore, traces are written with verbosity of 6.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-call-process
(vec program &optional infile destination display &rest args)
"Call `call-process' on the local host.
It always returns a return code. The Lisp error raised when
PROGRAM is nil is trapped also, returning 1. Furthermore, traces
are written with verbosity of 6."
(let ((destination (if (eq destination t) (current-buffer) destination))
(vec (or vec (car tramp-current-connection)))
output error result)
(tramp-message
vec 6 "`%s %s' %s %s"
program (string-join args " ") infile destination)
(condition-case err
(with-temp-buffer
(setq result
(with-tramp-local-environment
(apply
#'call-process program infile (or destination t) display args))
output (tramp-get-buffer-string destination))
;; `result' could also be an error string.
(when (stringp result)
(setq error result
result 1)))
(error
(setq error (error-message-string err)
result 1)))
(if (tramp-string-empty-or-nil-p error)
(tramp-message vec 6 "%s\n%s" result output)
(tramp-message vec 6 "%s\n%s\n%s" result output error))
result))