help-bash
[Top][All Lists]
Advanced

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

Re: About subshell implementation


From: Chet Ramey
Subject: Re: About subshell implementation
Date: Tue, 17 Mar 2020 15:38:48 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/17/20 2:47 PM, kevin shell wrote:
> EHLO bash users. :-D
> 
> How  bash or
> any Boune shell in general 
> implements subshell construct 
> (cmdlists) ?
> Does it have to call fork(2)+ execce(2) or
> just fork(2) system call only?

It calls fork to create the subshell and executes `cmdlist' in that
subshell. It may call execve as appropriate when executing simple commands
as part of `cmdlist'.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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