From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucio De Re To: 9fans@cse.psu.edu Subject: Re: [9fans] Ugly hack Message-ID: <20030217072751.R9084@cackle.proxima.alt.za> References: <20030216170019.Q9084@cackle.proxima.alt.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: ; from Russ Cox on Sun, Feb 16, 2003 at 10:40:31AM -0500 Date: Mon, 17 Feb 2003 07:27:51 +0200 Topicbox-Message-UUID: 640e4fc4-eacb-11e9-9e20-41e7f4b1d025 On Sun, Feb 16, 2003 at 10:40:31AM -0500, Russ Cox wrote: > > My impression was that you were trying to make > > echo */ > and > echo */. > > match only the directories. The fact that > Agreed. The original intent was indeed that. > access("/adm/users/.", 0) > > succeeds is a kernel bug and not something the shell > should be trying to hack around. The dotdot paper > shows a good example (ksh) of what confusion > results when user-level programs try to fix kernel bugs > (in that case, the handling of dotdot). > Appreciated. That was the problem raised by Geoff and he was quite right to surmise where the problem originated. However, the change I made to the shell was flawed, so I both fixed my error _and_ accidentally bypassed the kernel flaw. I wasn't aiming to do the latter. > Put another way, the definition of */. is (on Unix > or on Plan 9) all the valid paths you get by substituting > a name in the current directory for the star. > It so happens that this set is different on Plan 9, > and that is in fact a bug caused by early cleaning > of the names, and nothing more. It's not the shell's > fault, and it's certainly not the shell's place to patch > it up. > Accepted. But I've no idea how to fix it, so I leave that to superior intellects. That should cause pdksh to come right of its own accord. > In the process you appear to have improved rc's > performance somewhat, by using the extra information > you get from a Plan 9 readdir as opposed to a Unix readdir, > and that's nice, but not what I was referring to. > Indeed. As long as we agree that my changes to the shell were not aimed at fixing Geoff's anomaly, but rather to fix my poor understanding of the shell code in the initial attempt (which failed miserably on /bin/*/*, incidentally). ++L