]> git.eshelyaron.com Git - emacs.git/commit
Improve Eshell's behavior when waiting for processes
authorJim Porter <jporterbugs@gmail.com>
Sat, 6 Jul 2024 21:09:08 +0000 (14:09 -0700)
committerEshel Yaron <me@eshelyaron.com>
Wed, 10 Jul 2024 20:00:31 +0000 (22:00 +0200)
commit8c35638c12eaa4815542c66cfeaf788e9c1e431d
tree881c274cf734acba41a20116a19eaec56ba249a2
parent1de768821e5cf76c85821f4a57b5537783377368
Improve Eshell's behavior when waiting for processes

This has a few benefits.  First, it fixes a race condition when killing
old processes in 'eshell-command'.  Second, the "wait" built-in command
is now more useful.  Finally, killing processes when exiting Eshell (via
'eshell-round-robin-kill') should be much faster.

* lisp/eshell/esh-proc.el (esh-opt): Require.
(eshell-wait-for-process): Make obsolete in favor of...
(eshell-wait-for-processes): ... this.  Accept a timeout and support
PIDs.  Update callers.
(eshell/wait): New implementation accepting -t/--timeout.
(eshell-round-robin-kill): Use 'eshell-wait-for-processes'.

* lisp/eshell/eshell.el (eshell-command): Use 'eshell-round-robin-kill'.

* doc/misc/eshell.texi (List of Built-ins): Document the new "wait"
behavior.

* etc/NEWS: Announce this change.

(cherry picked from commit 8e46f44ea0eb761e24beda8c5cdbc8fcca87307a)
doc/misc/eshell.texi
etc/NEWS
lisp/eshell/esh-cmd.el
lisp/eshell/esh-proc.el
lisp/eshell/eshell.el