Hi, As we know, Linux implements thread as process, and a thread is merely a process that shares certain resources with other processes. But why the threads print the same process id? Code like this: void* print_pid(void* noused) { printf("%u\n",getpid()); return NULL; } int main() { printf("%u\n",getpid()); pthread_t thread_id; int ret=pthread_create(&thread_id, NULL, &print_pid, NULL); if(ret != 0 ){ return 1; } pthread_join(thread_id, NULL); return 0; } -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/