1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 22:11:21 -08:00
emacs/test/lisp/eshell
Jim Porter 50339b38fd Use 'unwind-protect' to ensure that Eshell always closes I/O handles
See bug#72220.

* lisp/eshell/esh-cmd.el (eshell-with-handles): New macro...
(eshell-commands): ... use it.
(eshell-with-copied-handles): Remove STEAL-P and allow multiple body
forms (this is an incompatible change, but the macro is currently
internal despite the name).
(eshell-parse-command, eshell-do-pipelines)
(eshell-do-pipelines-synchronously, eshell--invoke-command-directly-p):
Remove handle stealing.
(eshell-structure-basic-command, eshell-do-command)
(eshell-lisp-command): Remove 'eshell-close-handles'.
(eshell-protect): Make obsolete.
(eshell-rewrite-for-command, eshell-rewrite-while-command)
(eshell-rewrite-if-command, (eshell-parse-pipeline): Remove
'eshell-protect'.

* lisp/eshell/esh-io.el (eshell-duplicate-handles): Make STEAL-P
obsolete.

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Call
'eshell-protect-handles' one more time.  Remove 'eshell-close-handles'.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Reimplement
$<COMMAND> form using 'eshell-with-handles'.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/command-not-found/pipeline): New test.

* test/lisp/eshell/em-tramp-tests.el
(em-tramp-test/should-replace-command): Adjust check for
'eshell-with-copied-handles'.
2024-07-27 13:57:17 -07:00
..
em-alias-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
em-basic-tests.el Support setting umask symbolically in Eshell 2024-01-27 22:21:23 -08:00
em-cmpl-tests.el ; Fix test failures from the fix for bug#67661 2024-01-17 09:32:18 -08:00
em-dirs-tests.el In Eshell, don't expand quoted tildes into a user's home directory 2024-01-28 16:02:05 -08:00
em-extpipe-tests.el Improve handling of deferrable Eshell commands 2024-07-18 11:10:04 -07:00
em-glob-tests.el Add new Eshell built-in command 'funcall' 2024-05-16 20:33:18 -07:00
em-hist-tests.el Erase existing duplicates in eshell-history-ring 2024-05-24 19:29:20 -07:00
em-ls-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
em-pred-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
em-prompt-tests.el Ensure navigating by paragraphs in Eshell stops at prompts and paragraphs 2024-06-20 19:01:20 -07:00
em-script-tests.el ; Allow batch-file Eshell test on MS-Windows 2024-06-09 22:04:51 +03:00
em-tramp-tests.el Use 'unwind-protect' to ensure that Eshell always closes I/O handles 2024-07-27 13:57:17 -07:00
em-unix-tests.el Improve correctness of 'eshell-quote-argument' 2024-06-09 15:28:40 -07:00
esh-arg-tests.el In Eshell, allow an escaped newline at the end of a command 2024-01-28 15:54:46 -08:00
esh-cmd-tests.el Use 'unwind-protect' to ensure that Eshell always closes I/O handles 2024-07-27 13:57:17 -07:00
esh-ext-tests.el Use "/local:" prefix in Eshell to run local commands when cwd is remote 2024-05-15 18:50:54 -07:00
esh-io-tests.el Add ability for Eshell virtual targets to handle closing the target 2024-05-29 12:09:05 -07:00
esh-mode-tests.el Improve implementations of some Eshell output filter functions 2024-06-08 12:29:29 -07:00
esh-opt-tests.el ; Compute the list of symbols for 'eshell-eval-using-options' once 2024-02-13 12:27:38 -08:00
esh-proc-tests.el Don't set exit info in Eshell if the command is being piped elsewhere 2024-07-19 11:22:34 -07:00
esh-util-tests.el Fix Eshell tests on MS-Windows 2024-06-09 10:56:39 +03:00
esh-var-tests.el Improve correctness of 'eshell-quote-argument' 2024-06-09 15:28:40 -07:00
eshell-tests-helpers.el Fix Eshell "which" test on MS-Windows 2024-06-15 22:51:42 -07:00
eshell-tests-unload.el Consolidate Eshell module loading/unloading code 2024-05-29 12:09:05 -07:00
eshell-tests.el Allow using multiple buffers in 'eshell-command' 2024-07-05 19:40:29 -07:00