Messages in this thread | | | Date | Fri, 15 Feb 2002 12:17:58 -0600 (CST) | From | Jesse Pollard <> | Subject | Re: Redundant syscalls? |
| |
--------- Received message begins Here ---------
> > > I was wondering why do we need fsetxattr(2), fgetxattr(2) etc when we > already have setxattr(2), getxattr(2) etc working on file names > instead of file descriptors. > truncate(2)/ftruncate(2) is another more traditional example.
Atomic actions.
Consider the case of a file that doesn't exist yet. first you open it, then perform the fsetxattr. If you use the name, then it becomes possible to rename the file and substitute a different one before the setxattr. Now, the open file will be missing the attribute(s). ------------------------------------------------------------------------- Jesse I Pollard, II Email: pollard@navo.hpc.mil
Any opinions expressed are solely my own. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |