On Mon, 12 Oct 1998 19:46:03 +0200 (MET DST), Pavel Kankovsky
<peak@kerberos.troja.mff.cuni.cz> said:
> The real bug is the lack of means to get a reliable race-condition-free
> pointer at the file without actually opening it.
> What about something like this?
> fd = open(path, O_RDONLY | O_DEFEROPEN);
> fstat(fd, ...);
> if (directory) {
> fcntl(fd, F_DEFERREDOPEN, ...);
> ...
> }
Much easier to do
fd = open(path, O_RDONLY | O_DIRONLY);
and return ENOTDIR if it's not a directory.
--Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/