aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Porter2022-09-07 13:58:31 -0700
committerJim Porter2022-09-08 15:13:17 -0700
commitef17ba83709794fe0342743397f0e68b90ea1f69 (patch)
tree08260f0154c1f9ad376ff5acd130e106e3549bc4
parent0fab6328dcc46fe8733be5b9de214a2b11b79940 (diff)
downloademacs-ef17ba83709794fe0342743397f0e68b90ea1f69.tar.gz
emacs-ef17ba83709794fe0342743397f0e68b90ea1f69.zip
; Fix a race condition in an Eshell test
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/sigpipe-exits-process): Use "|&" when creating the pipeline to prevent an extra pipe process from being started.
-rw-r--r--test/lisp/eshell/esh-proc-tests.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el
index 52a0d1eeeb8..abe363bee0d 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -128,8 +128,10 @@
128 (eshell-match-command-output 128 (eshell-match-command-output
129 ;; The first command is like `yes' but slower. This is to prevent 129 ;; The first command is like `yes' but slower. This is to prevent
130 ;; it from taxing Emacs's process filter too much and causing a 130 ;; it from taxing Emacs's process filter too much and causing a
131 ;; hang. 131 ;; hang. Note that we use "|&" to connect the processes so that
132 (concat "sh -c 'while true; do echo y; sleep 1; done' | " 132 ;; Emacs doesn't create an extra pipe process for the first "sh"
133 ;; invocation.
134 (concat "sh -c 'while true; do echo y; sleep 1; done' |& "
133 "sh -c 'read NAME; echo ${NAME}'") 135 "sh -c 'read NAME; echo ${NAME}'")
134 "y\n") 136 "y\n")
135 (eshell-wait-for-subprocess t) 137 (eshell-wait-for-subprocess t)