; 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'.
This commit is contained in:
@@ -174,23 +174,17 @@
|
||||
pipeline."
|
||||
(skip-unless (and (executable-find "sh")
|
||||
(executable-find "cat")))
|
||||
;; An `eshell-pipe-broken' signal might occur internally; let Eshell
|
||||
;; handle it!
|
||||
(let ((debug-on-error nil))
|
||||
(eshell-command-result-equal
|
||||
(concat "echo hi | " esh-proc-test--detect-pty-cmd " | cat")
|
||||
nil)))
|
||||
(eshell-command-result-equal
|
||||
(concat "(ignore) | " esh-proc-test--detect-pty-cmd " | cat")
|
||||
nil))
|
||||
|
||||
(ert-deftest esh-proc-test/pipeline-connection-type/last ()
|
||||
"Test that only output streams are PTYs when a command ends a pipeline."
|
||||
(skip-unless (executable-find "sh"))
|
||||
;; An `eshell-pipe-broken' signal might occur internally; let Eshell
|
||||
;; handle it!
|
||||
(let ((debug-on-error nil))
|
||||
(eshell-command-result-equal
|
||||
(concat "echo hi | " esh-proc-test--detect-pty-cmd)
|
||||
(unless (eq system-type 'windows-nt)
|
||||
"stdout\nstderr\n"))))
|
||||
(eshell-command-result-equal
|
||||
(concat "(ignore) | " esh-proc-test--detect-pty-cmd)
|
||||
(unless (eq system-type 'windows-nt)
|
||||
"stdout\nstderr\n")))
|
||||
|
||||
|
||||
;; Synchronous processes
|
||||
|
||||
Reference in New Issue
Block a user