help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: So confused: bash vs ssh and SHLVL=0?


From: Paul Smith
Subject: Re: So confused: bash vs ssh and SHLVL=0?
Date: Mon, 12 Oct 2020 10:48:05 -0400
User-agent: Evolution 3.36.4-0ubuntu1

On Mon, 2020-10-12 at 10:13 -0400, Chet Ramey wrote:
> This is exactly the situation I described. Bash decrements
> shell_level before executing make, make, I assume, expands its own
> value of SHLVL before invoking the shell to execute the command, the
> shell increments SHLVL at startup and expands it.

Yes, make imports SHLVL from the environment it received, and creates a
make variable from it.

> I think I can figure out a way to exempt pipelines from this
> behavior.

I think it would be helpful to treat a pipeline exec differently from
explicit exec, at least in this specific way.

Thanks Chet!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]