From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <140e7ec30911231833s73573dfbn23cf0ef0650ada5e@mail.gmail.com> References: <140e7ec30911231833s73573dfbn23cf0ef0650ada5e@mail.gmail.com> Date: Tue, 24 Nov 2009 09:34:12 +0100 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000e0cd296007a1194047919cedf Subject: Re: [9fans] environment variables Topicbox-Message-UUID: 9f2f8ab4-ead5-11e9-9d60-3106f5b1d025 --000e0cd296007a1194047919cedf Content-Type: text/plain; charset=ISO-8859-1 > Rc forks a new process for every [non builtin] command it runs. To > avoid such, use the . command to source the script instead of running > it. > Ok. The thing about forking is clear. Yes, your suggestion of using . would 'solve' the problem of seeing the variables set in the 'a' script (called from 'b'). However then I would e.g. really have to care about individual 'cd' commands in the 'a' script so as to know where I am after returning back to the 'b' script. I thought there would be some way to make the 'b' script reread the environment (i.e. to achieve information passing through the environment). What is the use of that 'caching' that hinders this way? Each process has a current dir. I don't think it is ever shared between > them. > -sqweek > Ok. I was tired... Thanks Ruda --000e0cd296007a1194047919cedf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
=A0Rc forks a ne= w process for every [non builtin] command it runs. To
avoid such, use the . command to source the script instead of running
it.
Ok. The thing about forking is cl= ear. Yes, your suggestion of using . would 'solve' the problem of s= eeing the variables set in the 'a' script (called from 'b')= . However then I would e.g. really have to care about individual 'cd= 9; commands in the 'a' script so as to know where I am after return= ing back to the 'b' script. I thought there would be some way to ma= ke the 'b' script reread the environment (i.e. to achieve informati= on passing through the environment). What is the use of that 'caching&#= 39; that hinders this way? =A0

=A0Each process has a current dir. I = don't think it is ever shared between them.
-sqweek

Ok. I was tired...
<= div>
Thanks
Ruda
--000e0cd296007a1194047919cedf--