summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2020-05-16 14:04:07 +0200
committerMichael Albinus <michael.albinus@gmx.de>2020-05-16 14:04:07 +0200
commitbbbab82a7117e08a77433f5ad39b34f5e03a014c (patch)
tree52ce224c6f704873ebbb2c50d9203592c2baea5f /lisp/simple.el
parentdba8f3783b209fef5be2589528ed43a99a8bab6a (diff)
downloademacs-bbbab82a7117e08a77433f5ad39b34f5e03a014c.tar.gz
emacs-bbbab82a7117e08a77433f5ad39b34f5e03a014c.tar.bz2
emacs-bbbab82a7117e08a77433f5ad39b34f5e03a014c.zip
Introduce process-file-return-signal-string
* doc/lispref/processes.texi (Synchronous Processes): Describe `process-file-return-signal-string'. * doc/misc/tramp.texi: Adapt Tramp and Emacs version numbers. (Remote processes): Describe `process-file-return-signal-string' and $INSIDE_EMACS. * etc/NEWS: Describe `process-file-return-signal-string'. Fix typos. * lisp/simple.el (process-file-return-signal-string): New user option. * lisp/net/tramp-adb.el (tramp-adb-handle-process-file): * lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Use it. * lisp/net/tramp.el (tramp-get-signal-strings): New defun. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index b5ba05426f5..d151d6c9aeb 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4141,6 +4141,20 @@ its behavior with respect to remote file attribute caching.
You should only ever change this variable with a let-binding;
never with `setq'.")
+(defcustom process-file-return-signal-string nil
+ "Whether to return a string describing the signal interrupting a process.
+When a process returns an exit code greater than 128, it is
+interpreted as a signal. `process-file' requires to return a
+string describing this signal.
+Since there are processes violating this rule, returning exit
+codes greater than 128 which are not bound to a signal,
+`process-file' returns the exit code as natural number also in
+this case. Setting this user option to non-nil forces
+`process-file' to interpret such exit codes as signals, and to
+return a corresponding string."
+ :version "28.1"
+ :type 'boolean)
+
(defun start-file-process (name buffer program &rest program-args)
"Start a program in a subprocess. Return the process object for it.