Subject: Re: What should stat("",&fs) return?
To: J.T. Conklin <jconklin@netcom.com>
From: Charles M. Hannum <mycroft@mit.edu>
List: current-users
Date: 05/30/1996 18:15:14
jconklin@netcom.com (J.T. Conklin) writes:

> 
> > I just came across some code that (because of another bug) tries
> > to stat() a null string. And NetBSD (i386 and alpha) returns zero
> > from this test:
> 
> > OSF/1 and HPUX return -1 with errno = ENOENT. I would have expected
> > NetBSD to behave the same way. Am I missing something?
> 
> If I remember things correctly, "" is an invalid filename on SysV-ish
> systems, but is interpreted as "." on BSD-ish systems.

Actually, it's treated at the current directory.  There's a subtle
distinction between this and `.'.

It could be argued that this behaviour should be changed.  I'm not
sure how many things would break.