RE: fcntl file locking and pthreads

Mikhail Kruk (meshko@cs.brandeis.edu)
Sun, 4 May 2003 17:50:49 -0400 (EDT)


> > Two reference platforms for
> > threads are Solaris and Windows. I don't know how Solaris handles this,
> > but on Windows file locks are per thread, not per process.
>
> Surely your argument isn't that UNIX should do things a certain way because
> that's how Windows does it? We can talk about two things, how things are and
> how they should be. This discussion seemed to be about how things should be.

I mentioned Windows because it happens to have a very mature threading
implementation and I don't see why Unix can't look at something from
Windows as a reference.
Anyway, I understand your argument about thread vs processes resources. I
also checked that it works the same way on Solaris (which of course is a
better reference point for Linux), so I agree that fcntl behavior is ok.
Thanks for your explanation!

-
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/