From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <0fdf1724083db9d68cc2e1d3c5a0bc7e@vrtra.net> References: <041beafe28d237c7ab5edbd2ad94bace@sp.inri.net> <0fdf1724083db9d68cc2e1d3c5a0bc7e@vrtra.net> Date: Wed, 16 May 2012 09:02:42 +0200 Message-ID: From: Gorka Guardiola To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] rc behavior with rfork Topicbox-Message-UUID: 8e2e315a-ead7-11e9-9d60-3106f5b1d025 > On the otherhand, putting any command in the chain makes the behavior > disappear. > > cpu% @{rfork e; echo hi} |cat > /env/hi cpu% cat /env/hi hi > > My question is, is this intensional? =A0It feels as if there is a > leakage here of the rfork when its effect is felt beyond the braces, > and it feels odd for the two fs interfaces to behave differently (even > though one of them is special) > When the subshell executes the rfork, how is it to know that the /env is "outside of the braces"? Another way of asking it is: if I have a program with an open file descriptor in /env and calls rfork RF= ENVG what should happen with its /env? That program is the shell and any command it executes that inherits the file descriptor. G.