* Parameter $! documentation bug
@ 2019-07-07 0:17 Vincent Lefevre
2019-07-07 4:32 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Lefevre @ 2019-07-07 0:17 UTC (permalink / raw)
To: zsh-workers
The zshparam(1) man page says:
! <S> The process ID of the last command started in the background
with &, or put into the background with the bg builtin.
but
zira% sleep 10 &
[1] 20475
zira% coproc sleep 10
[2] 20478
zira% echo $!
20478
I assume that coproc commands are also concerned by $!.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Parameter $! documentation bug
2019-07-07 0:17 Parameter $! documentation bug Vincent Lefevre
@ 2019-07-07 4:32 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2019-07-07 4:32 UTC (permalink / raw)
To: zsh-workers
On Sat, Jul 6, 2019 at 5:18 PM Vincent Lefevre <vincent@vinc17.net> wrote:
>
> I assume that coproc commands are also concerned by $!.
IIRC coproc commands did not, originally, get job table entries, and
although it has been years since they began to do so, the doc for $!
probably predates that.
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 9ad228679..9acd52f2e 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -629,7 +629,7 @@ startitem()
vindex(!)
item(tt(!) <S>)(
The process ID of the last command started in the background with tt(&),
-or put into the background with the tt(bg) builtin.
+put into the background with the tt(bg) builtin, or spawned with tt(coproc).
)
vindex(#)
item(tt(#) <S>)(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-07 4:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-07 0:17 Parameter $! documentation bug Vincent Lefevre
2019-07-07 4:32 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).