Re: 2.0.6 released

"Calin A. Culianu" <[email protected]>
Newsgroups gmane.linux.dazuko.devel
Message-ID <[email protected]>

On Sun, 27 Mar 2005, Calin A. Culianu wrote:

>
>
> On Wed, 23 Mar 2005, John Ogness wrote:
>
>> Sami Tikka wrote:
>>> P.S. A somewhat-related question: If I have a threaded application (and I 
>>> do) and one or more of the threads register with dazuko, does dazuko 
>>> intercept file accesses of threads belonging to the same process but have 
>>> not registered with dazuko? (I have been working with the assumption that 
>>> dazuko intercepts all threads, regardless of process, if they have not 
>>> been registered.)
>> 
>> For Linux, threads are implemented with different PID's. So yes, each 
>> thread is handled differently.
>
> This actually isn't always the case -- there is a concept of a thread-id in 
> linux and some implementations of pthreads use the clone() system call in 
> such a way that all threads share the same PID.  In fact, the NPTL pthread

Actually nevermind.  That's just a userspace illusion.  Since 2.4, the 
kernel actually returns the thread-group id when you call getpid()!! This 
ID is usually the PID of the process that created the thread group.  I 
guess this is to support the posix notion of multiple threads sharing the 
same 'pid' (although internally in the kernel they don't).  Bleh.

In reality (as in, inside the kernel) the process ID is in fact unique for 
each thread.

So I guess this fact doesn't impace dazuko?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.