From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 24 Nov 2009 10:33:54 +0800 Message-ID: <140e7ec30911231833s73573dfbn23cf0ef0650ada5e@mail.gmail.com> From: sqweek To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] environment variables Topicbox-Message-UUID: 9f119fa4-ead5-11e9-9d60-3106f5b1d025 2009/11/24 Rudolf Sykora : > If I have an rc script and I don't specify any rfork in it, then the > namespace and the environment should be shared. > But it does not work like that, thanks to some > caching or what. How should the 'b' script, or whatever, be corrected so > that it work? 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. > Further, I am now a bit puzzled about whose property the 'current directory' > is. Why isn't the directory changed to 'c' after runing either the 'a' or > 'b' script? Is this always a local property of each shell? Each process has a current dir. I don't think it is ever shared between them. -sqweek