Hi,

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 attachment is a program to test this. If a few
kind people with linux boxes could compile, run and 
send me the results of it that would help me out.

To compile do:

$ gcc -pthread tst_getpid.c -o tst_getpid

It will take a few seconds to print out 5 lines of
the form "pid is XXX". I need to know whether or not
all 5 XXX numbers are the same or distinct. 

Please include the output of command 'uname -a' and
your distro if you can do this.

Thanks enormously,

Dan.


        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void *thread_main(void *pArg){
  printf("pid is %d\n", getpid());
  sleep(10);
}

int main(int argc, char **argv){
  pthread_t thread;
  int i;

  for( i = 0; i < 5 ; i++ ){
    pthread_create(&thread, 0, thread_main, 0);
    sleep(1);
  }

  return 0;
}


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

Reply via email to