Miklos Szeredi wrote:
>
> The *at() thing basically gives you the advantages of a CWD without
> the disadvantages.
>
> For example it could be useful to implement the functionality of
> find(1) as a library interface.
>
What the *at() interfaces really do is fix/paper over a longstanding
wart in Unix: the cwd really should have been a standard file descriptor
(like stdin/stdout/stderr) instead of a magic piece of state maintained
in kernel space.
If they had been designed-in from the beginning I suspect we wouldn't
have had, say, stat() and fstat(), but simply statat() -- the "normal"
ones would simply be statat(stddir, path) and statat(fd, NULL)
respectively. Now it isn't quite so clean.
You can do some of that stuff with fchdir(), but *at() is much nicer,
minus the oddball Solaris naming with random presence and absence of f-
prefixes.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]