Re: File locking anomaly under 2.0.30

Matthias Urlichs (
25 Jul 1997 17:20:36 +0200

Christopher Blizzard <> writes:
> I think it's important here to seperate the concepts of a process and
> thread of execution within a process. When you do a clone() on a process

Threads are processes which happen to share the same memory map / file
descriptor space / whatever. Linus seems to be pretty adamant on this.

> The snippit that Ted has referenced above should not apply to new threads
> within a single process. Unless POSIX says that new threads within the
> scope of a process shouldn't inherit locks, new threads should probably
> inherit them just like everything else. :)
Currently, the file descriptor space isn't inherited; it's shared.
POSIX locks apply per thread. I do not like to change that, though I'd like
to know what, if anything, POSIX says about this.

The current model assumes that async I/O is, or will be, carried out by a
(sub)thread. The current LinuxThreads implementation collects all
subthreads under a single manager process. As I pointed out, all of this
results in a problem.

Matthias Urlichs