Hi Dainel,

From: "Daniel K" <[EMAIL PROTECTED]>
> The getpid() call on my Redhat9 linux box is causing
> some trouble for SQLite. It's reasonably complicated,
> but SQLite currently assumes that on linux the
> getpid() function returns a different value in
> different threads. Not so for my setup!
>

The reason that getpid() on some systems returns the same pid for all
threads in a process and differenct pids for each thread on another system
is because different thread implementations are used.
Different platforms use different thread implementations - you cannot even
be sure that different linux distros use the same thread implementation and
it may even change between releases of the same distro...

You should always use pthread_self() to obtain (per process) unique
identifiers for your threads.

You can read more here:
http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html

/Uffe




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to