diff options
| author | Jim Porter | 2024-07-06 14:09:08 -0700 |
|---|---|---|
| committer | Jim Porter | 2024-07-09 17:28:32 -0700 |
| commit | 8e46f44ea0eb761e24beda8c5cdbc8fcca87307a (patch) | |
| tree | 9b9056b88b716f82e926a2a3896695b9ea11b65d /doc/misc | |
| parent | 342998511add79c594a170dc04ecda2f2db0fd36 (diff) | |
| download | emacs-8e46f44ea0eb761e24beda8c5cdbc8fcca87307a.tar.gz emacs-8e46f44ea0eb761e24beda8c5cdbc8fcca87307a.zip | |
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.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/eshell.texi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 69f94fab469..8547131194e 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi | |||
| @@ -1201,8 +1201,11 @@ or a string, referring to an environment variable. | |||
| 1201 | 1201 | ||
| 1202 | @cmindex wait | 1202 | @cmindex wait |
| 1203 | @cindex processes, waiting for | 1203 | @cindex processes, waiting for |
| 1204 | @item wait [@var{process}]@dots{} | 1204 | @item wait [-t @var{timeout}] [@var{process}]@dots{} |
| 1205 | Wait until each specified @var{process} has exited. | 1205 | Wait until each specified @var{process} has exited. Processes can |
| 1206 | either be process objects (@pxref{Processes, , , elisp, GNU Emacs Lisp | ||
| 1207 | Reference Manual}) or integer PIDs. If you pass @code{-t} or | ||
| 1208 | @code{--timeout}, wait at most that many seconds before exiting. | ||
| 1206 | 1209 | ||
| 1207 | @cmindex which | 1210 | @cmindex which |
| 1208 | @item which @var{command}@dots{} | 1211 | @item which @var{command}@dots{} |