Re: 2.0.6 released
"Calin A. Culianu" <[email protected]>
| Newsgroups | gmane.linux.dazuko.devel |
|---|---|
| Message-ID | <[email protected]> |
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 library I believe does this. If you want to figure out which thread you are in, you actually have to look at the thread-id (TID) using the linux-specific system call gettid(). How that impacts Dazuko? No idea.. but.. I just wanted to clarify that on some distros threads do share the same PID as the original process from which they came!