]> git.eshelyaron.com Git - emacs.git/commit
Don't set exit info in Eshell if the command is being piped elsewhere
authorJim Porter <jporterbugs@gmail.com>
Fri, 19 Jul 2024 16:34:03 +0000 (09:34 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 22 Jul 2024 10:32:47 +0000 (12:32 +0200)
commitada9b095695012776c483e671d90b3b9c5942447
tree8d3e7e9638b72126cc727d8aae2262140170eb81
parent4a5cc876c9eed8e1f0d493ab63a99434821f620e
Don't set exit info in Eshell if the command is being piped elsewhere

Previously, the exit info in Eshell was that of the last command that
finished, rather than the last command in a pipeline.

* lisp/eshell/esh-cmd.el (eshell-exec-lisp)
(eshell-lisp-command): Check whether the command is being piped.

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Record whether
the command is being piped...
(eshell-sentinel): ... and do the right thing with that info.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/sigpipe-exits-process): Check the exit status to ensure
we don't report the first process's SIGPIPE exit.

(cherry picked from commit b7893e73878df83043e05dc8cb811971c0e99f03)
lisp/eshell/esh-cmd.el
lisp/eshell/esh-proc.el
test/lisp/eshell/esh-proc-tests.el