Re: bash < execline > bash

From: Eric Vidal <eric_at_obarun.org>
Date: Sun, 1 May 2016 17:10:16 +0400

On Sun, 1 May 2016 12:34:07 +0200
Laurent Bercot <ska-skaware_at_skarnet.org> wrote:

> On 01/05/2016 12:26, Eric Vidal wrote:
> > One more question, my knowledge is not sufficient to understand this following command :
> > unexport ?
> > i'm not understand the ? here
>
> ? is the environment variable set by the "foreground" command. It holds
> the exit code of the command run in the foreground block. In other words:
> "foreground { A } B" will run A, then it will run B with A's exit code
> contained in the ? environment variable.
>
> If no program in the rest of the chain is going to use this variable,
> it's best to unexport it - especially if the chain is going to fork a lot
> (as is the case with init).
>
>
> > unexport !
>
> Same thing. The ! environment variable is set by utilities like
> "background" or "pipeline", and contains the pid of the forked process.
> If nothing is going to use the value, better clean up the environment.
>
> --
> Laurent
>
understood
Many Thank

-- 
Eric Vidal <eric_at_obarun.org>
Received on Sun May 01 2016 - 13:10:16 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC