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