9fans archive / 2008 / 10 / 422 / prev next
From: Lyndon Nerenberg <lyndon@ort...>
Subject: Re: [9fans] @{cd ...} breaks completion with ctrl-f/ins; help needed
Date: Tue, 28 Oct 2008 14:17:04 -0700 (Pacific Daylight Time)
> This saving&restoring seems flawed to me due to possible race-conditions...
> I'd expect each shell had its own copy of /dev/wdir... But I may be
> easily wrong...
When a rc forks a subshell the child shares the namespace with the parent.
If you want the child rc to divorce its namespace from the parent, have it
issue 'rfork n'.
There is no race condition; this is documented behaviour.
You need to (re-)read the namespaces paper in /sys/doc/names.ps.
--lyndon