NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/45425: how to restore traditional unix behaviour for slashes on the end of pathnames

The following reply was made to PR kern/45425; it has been noted by GNATS.

From: David Holland <>
        "Greg A. Woods" <>
Subject: Re: kern/45425: how to restore traditional unix behaviour for
 slashes on the end of pathnames
Date: Sun, 13 Nov 2011 17:57:32 +0000

 On Sat, Nov 05, 2011 at 09:35:02PM +0000, Greg A. Woods wrote:
  >>  That doesn't work for e.g. mkdir.
  >  Of course not!  :-)
  >  mkdir(2) creates a new directory, one that does not yet exist.
  >  Appending the "/." would only specify an existing directory.
  >  Trying to re-create an existing directory again is an error.  :-)
 Sure, but "mkdir foo/" is currently accepted.
  >  >  That would drive me crazy, FWIW. And probably not just me. So it's not
  >  >  exactly neutral.
  >  :-)
  >  I guess you didn't start out by using a traditional Unix.  :-)
 Perhaps not. I'm not old enough to have used anything more antique
 than Ultrix and SunOS4 for serious purposes. I guess I've also tangled
 with HP-UX 9.x, which (being SVR3) was conceptually far more dated
 than even Ultrix, regardless of its official timestamp.
  >  I think the big problem here has come when people confuse the way the
  >  kernel interprets pathnames with the way some applications interpret
  >  pathnames some of the time, just as you do below.
 I what?
  >  >  Also, to avoid massive confusion you'd have to change globbing so that
  >  >  "*/" behaves consistently,
  >  I must confess I have never, to the best of my memory, seen such a thing
  >  attempted.
  >  That's a shell issue anyway, not a kernel/namei issue.  The kernel does
  >  no globbing.
 Of course. But so what? The system's overall behavior should be
  >  >  and that in turn will break a bunch of
  >  >  scripts that do things like "ls -d */ | ...".
  >  I've definitely never seen anything like that.  I would think it was an
  >  error if I did see it.
 Perhaps your experience isn't universal...
 David A. Holland

Home | Main Index | Thread Index | Old Index