diff options
author | Jim Porter <jporterbugs@gmail.com> | 2023-09-24 22:30:34 -0700 |
---|---|---|
committer | Jim Porter <jporterbugs@gmail.com> | 2023-10-01 13:11:09 -0700 |
commit | 862e5effbf9b991af3fbbc8e31df33e64483c56f (patch) | |
tree | cf92ebb1ded1523c63e3c46dbcbeea87524d5673 /lisp/eshell | |
parent | 6b2219cd2744c711580cc7226554e69c8cec8247 (diff) | |
download | emacs-862e5effbf9b991af3fbbc8e31df33e64483c56f.tar.gz |
; Adjust Eshell regression tests to avoid SIGPIPE
In batch mode, SIGPIPEs can cause Emacs to abort (bug#66186).
* lisp/eshell/esh-io.el (eshell-output-object-to-target): Update
comment.
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/pipeline-connection-type/middle)
(esh-proc-test/pipeline-connection-type/last): Use '(ignore)', since
that causes no output when called with no arguments, thus avoiding a
risky 'process-send-string'.
Diffstat (limited to 'lisp/eshell')
-rw-r--r-- | lisp/eshell/esh-io.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index cd0cee6e21d..d0f1e04e925 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -648,8 +648,11 @@ Returns what was actually sent, or nil if nothing was sent.") (process-send-string target object) (error ;; If `process-send-string' raises an error and the process has - ;; finished, treat it as a broken pipe. Otherwise, just - ;; re-throw the signal. + ;; finished, treat it as a broken pipe. Otherwise, just re-raise + ;; the signal. NOTE: When running Emacs in batch mode + ;; (e.g. during regression tests), Emacs can abort due to SIGPIPE + ;; here. Maybe `process-send-string' should handle SIGPIPE even + ;; in batch mode (bug#66186). (if (process-live-p target) (signal (car err) (cdr err)) (signal 'eshell-pipe-broken (list target))))) |