Mail Archives: djgpp-workers/2003/08/11/17:15:08
Hello.
Eli Zaretskii wrote:
[snip]
> Sorry, I don't see how fstat could be relevant here: we are talking
> about directories, and fstat cannot be possibly called on directories,
> since we cannot `open' a directory to get a file descriptor.
Actually, that's not true. From the "What's Changed" document:
"The function `fchdir' was added. This required modifications to the
POSIX functions `open', `read', `write', `lseek', `ftruncate', `fstat',
`select', `fsync' and `fdopen' and the ANSI functions `fopen',
`freopen', `fclose', `ftell', `fseek' and `rewind', to make them aware
of file descriptors for directories."
I wonder if the 'rm' code actually calls fstat on an a directory file
descriptor, though. It doesn't sound like it.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -