Subject: Re: Addition to force open to open only regular files
To: None <firstname.lastname@example.org>
From: Love <email@example.com>
Date: 11/24/2000 09:15:08
[ Not that I'm intrested in getting flamed, just trying to point out that
this already exists ]
Greywolf <firstname.lastname@example.org> writes:
> reserve() would return a filehandle of sorts
> which could then be passed to ropen() to return a descriptor?
> One could also have an rstat() call to stat the filehandle and find out
> what you've reserved.
> Since the reserve would lock the node, the rstat() would be guaranteed to
> return valid information, and ropen() would be guaranteed to return a
> valid fd into the data, even if an unlink() has transpired.
That is not the case getfh(2), but then why would you want it.
> It seems to me probably a bit extreme, though, to go through these hoops
> to accomplish something that is probably best solved in another way,
> although a reserve() call would be GREAT for things like temp files...
What's wrong with open(...|O_EXCL) ?