bug-bash
[Top][All Lists]
Advanced

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

Re: Misused term "subshell" in §3.3 of the Bash Manual


From: Stephane Chazelas
Subject: Re: Misused term "subshell" in §3.3 of the Bash Manual
Date: Mon, 21 Sep 2015 14:58:58 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

2015-09-21 08:49:42 -0400, Greg Wooledge:
> On Mon, Sep 21, 2015 at 07:45:25PM +0800, ziyunfei wrote:
> > "Functions may be exported so that *subshells* automatically have them 
> > defined with the -f option to the export builtin"
> > 
> > Technically, a child shell process forked/execed by the current shell is 
> > not a real subshell,  am I right?  
> 
> I agree with you, but it's not clear what the best wording should be.
> Exported functions only work when the (grand)child process receiving
> them is another instance of bash.
[...]

It's not that much the process parent/child relationship that
matters. "export" if for passing things to *executed* commands
(the environment is something that is passed to the execve()
system call, whether in the current shell process or child or
grandchild... one).

-- 
Stephane



reply via email to

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