Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $PPID not updated when the PPID changes (parent killed)
- X-seq: zsh-workers 48878
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: $PPID not updated when the PPID changes (parent killed)
- Date: Tue, 18 May 2021 17:18:35 +0200
- Archived-at: <https://zsh.org/workers/48878>
- In-reply-to: <CAH+w=7bywj1X1fyPLgpmo_OoqBEN8PjEDxDeKP-tMR_O4g04tg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20210516152418.GA39669@zira.vinc17.org> <CAH+w=7a3y6MjrPQWnPc1O0ESroLesZXwaQ-_AxJB5XRk7xDj2Q@mail.gmail.com> <20210517202608.GA3255290@zira.vinc17.org> <CAH+w=7bhsp71vazSJ_9Un1btb4mrxBgUciUg4zfGv15LeUfT1g@mail.gmail.com> <YKLttAsFd4bl9waS@fullerene.field.pennock-tech.net> <CAH+w=7bywj1X1fyPLgpmo_OoqBEN8PjEDxDeKP-tMR_O4g04tg@mail.gmail.com>
On 5/18/21, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Aside, it's a bit odd that SHLVL isn't read-only. Even assorted Bash
> tutorials found by online search treat it as immutable (statements
> like "$dog is only available at SHLVL 2") despite that it can be
> arbitrarily messed with.
I sometimes set it (in practice only to the empty string), such that
the first shell in a new terminal always ends up with SHLVL=1 (my
prompt hilights when it is non-1 so that i know i can safely exit
without having the terminal be closed, eg while testing new zsh builds
or other things where i want a temporary shell state). I also do some
window manager development so things like "SHLVL= openbox --replace"
tend to happen as well.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author