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 20:30:06 -0400, Phil Pennock wrote:
> Here we go, my `.xsessionrc` file has some cruft which for once is only
> about 15 years old:
> 
> # Sometimes /bin/sh is a shell which sets $SHLVL
> if [ ".$SHLVL" != "." ]; then
>         echo >&2 "Warning: unsetting \$SHLVL: $SHLVL"
>         unset SHLVL
> # In addition, if the window manager is invoked via a script which is #!/bin/sh
> # then it may be necessary to repair damage therein.  Eg, startxfce4,
> # /etc/xdg/xfce4/xinitrc
> fi

My window manager is started by a zsh script (mainly for ssh-agent
handling), so that I had to do "unset SHLVL". I suppose that I could
have used "env -u SHLVL ...", but "unset SHLVL" is simpler.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - 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)




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