1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

48888: improve doc for $$ and $PPID, add fail test for PPID readonly-ness

This commit is contained in:
Bart Schaefer 2021-09-06 12:46:28 -07:00
parent c0e5b212f3
commit a31fd3077d
4 changed files with 17 additions and 10 deletions

View file

@ -1,5 +1,8 @@
2021-09-06 Bart Schaefer <schaefer@zsh.org> 2021-09-06 Bart Schaefer <schaefer@zsh.org>
* 48888: Doc/Zsh/mod_system.yo, Doc/Zsh/params.yo, Test/E03posix.ztst:
improve doc for $$ and $PPID, add fail test for PPID readonly-ness
* 48832: Completion/Unix/Type/_urls: try _gnu_generic first * 48832: Completion/Unix/Type/_urls: try _gnu_generic first
2021-09-04 Oliver Kiddle <opk@zsh.org> 2021-09-04 Oliver Kiddle <opk@zsh.org>

View file

@ -263,9 +263,9 @@ tt($$), which returns the process ID of the main shell process.
) )
item(tt(ppid))( item(tt(ppid))(
vindex(ppid, sysparams) vindex(ppid, sysparams)
Returns the process ID of the parent of the current process, even in Returns the current process ID of the parent of the current process, even
subshells. Compare tt($PPID), which returns the process ID of the parent in subshells. Compare tt($PPID), which returns the process ID of the
of the main shell process. initial parent of the main shell process.
) )
item(tt(procsubstpid))( item(tt(procsubstpid))(
Returns the process ID of the last process started for process Returns the process ID of the last process started for process

View file

@ -654,10 +654,11 @@ Same as tt(#).
) )
vindex($) vindex($)
item(tt($) <S>)( item(tt($) <S>)(
The process ID of this shell. Note that this indicates the original The process ID of this shell, set when the shell initializes. Processes
shell started by invoking tt(zsh); all processes forked from the shells forked from the shell without executing a new program, such as command
without executing a new program, such as subshells started by substitutions and commands grouped with tt(LPAR())var(...)tt(RPAR()),
tt(LPAR())var(...)tt(RPAR()), substitute the same value. are subshells that duplicate the current shell, and thus substitute the
same value for tt($$) as their parent shell.
) )
vindex(-) vindex(-)
item(tt(-) <S>)( item(tt(-) <S>)(
@ -817,9 +818,9 @@ The operating system, as determined at compile time.
) )
vindex(PPID) vindex(PPID)
item(tt(PPID) <S>)( item(tt(PPID) <S>)(
The process ID of the parent of the shell. As for tt($$), the The process ID of the parent of the shell, set when the shell initializes.
value indicates the parent of the original shell and does not As with tt($$), the value does not change in subshells created as a
change in subshells. duplicate of the current shell.
) )
vindex(PWD) vindex(PWD)
item(tt(PWD))( item(tt(PWD))(

View file

@ -161,3 +161,6 @@ F:POSIX has neither math functions nor floating point
0f:Width of %s is computed in bytes not characters 0f:Width of %s is computed in bytes not characters
F:This is considered a bugfix in zsh F:This is considered a bugfix in zsh
>< Stéphane> >< Stéphane>
PPID=foo
-f:PPID is not a readonly variable