Re: VFS locking: f_pos thread-safe ?

viro
2004-02-06T13:56:25Z

On Fri, Feb 06, 2004 at 10:50:09AM -0300, Werner Almesberger wrote:
> Andrew Morton wrote:
> > Not unless we can think of a way in which it actually matters, thanks.
>
> What I'm struggling with when reading that POSIX draft is to
> understand whether CLONE_FILES is appropriate or not for
> pthread_create.
>
> If this is unspecified, the f_pos issue becomes largely academic,
> although one might argue that read() should behave either one
> way or the other.
>
> And no, luckily, I don't have a real-life application for this
> either :-)

WTF does that have to CLONE_FILES? Whether you share descriptor table
or get an independent copy, pointers to struct file are the same.