Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: $PPID not updated when the PPID changes (parent killed)



On 2021-05-17 at 14:00 -0700, Bart Schaefer wrote:
> Still mulling over possible rewording (at the very least change "for"
> to "with" in that phrase).  Suggestions that don't try to explain unix
> process hierarchy management in detail, are welcome.

PPID <S>
  The initial parent process ID; that is, the process ID of the process
  which created this shell process, at the time that it did so.
  Just as for $$, the value is only set for the original shell and does
  not dynamically change for implicit subshells (as created for (list)
  and for pipelines).

I am unsure of the subshells to implicit subshells and the parenthetical
note.  It's an attempt to be clearer that "if you run zsh within zsh,
that's not a subshell, sure _that_ gets $$ and $PPID reset".

-Phil




Messages sorted by: Reverse Date, Date, Thread, Author