This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: several changes today


> Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:
> 
> > Ok, that's fine - but don't we lose functionality since the checks if
> > it really is a directory are only done if the kernel understands the
> > flag?
> 
> If somebody is so paraniod it is not asked to much for them to update
> to the most recent kernel.  The fstat call isn't really necessary IMO
> but if the platform does not provide any functionality to make sure we
> open a directory it should be there.  For Linux there is a better
> solution (upgrading the kernel) and therefore I see no problem with
> leaving the fstat call out even if the kernel does not check this.

1003.1-1996 requires that opendir detect a nondirectory and return ENOTDIR.
It is not optional.  Unless the check is known for sure to be done by the
kernel at the particular time, libc must check with fstat to be correct.
As well as violating POSIX, allowing the possibility of failing to check 
would be a subtly incompatible change that might affect existing programs
in obscure ways.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]