Subject: Re: Trailing '/' to mkdir(2) revisited
To: Greywolf <greywolf@starwolf.com>
From: Greg A. Woods <woods@weird.com>
List: tech-kern
Date: 06/24/2003 12:32:31
[ On Tuesday, June 24, 2003 at 00:09:44 (-0700), Greywolf wrote: ]
> Subject: Re: Trailing '/' to mkdir(2) revisited
>
> Thus spake Greg A. Woods ("GAW> ") sometime Today...
> 
> GAW> _ALL_ systems based on traditional Unix _ignore_ _all_ trailing slashes
> GAW> on _all_ pathanmes for all system calls.
> 
> ...does this include 4.[123] BSD

Well I wouldn't call any *BSD a "traditional Unix" -- though of course
to anyone who's entered this world of unix more recently that will be a
somewhat confusing statement.  :-)

My claim may cover 4.1BSD, and possibly 4.2BSD as well, though I'm
pretty sure it does not cover 4.3BSD.  I don't have handy access to the
earlier sources, but the 4.3net2 sources do not seem to ignore any
trailing slashes, at least not from what I can tell on cursory
examination (ENOTDIR is returned in sys/kern/vfs_lookup.c:lookup() for
non-directories when what the comments call "degenerate names" are
encountered, by which it claims to mean those which have an empty
basename component).  (multiple slashes are of course collapsed into
one, as in NetBSD today)

>  (which were based on System 7, IIRC, at
> least in the beginning...).

Early *BSD kernels were based on the Sixth Edition.  As I recall even
3.9BSD still had a distinctly V6-feel in userland as well, though 4.1BSD
was definitely moving ahead of V7 in terms of features in both kernel
and userland.

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>