...thread_b,NULL); if(err < 0) { perror("pthread_create thread_a"); } sleep(5); printf("the main close\n"); return 0; } 程序运行结果: thread a enter pid = 3B89, posix_tid = b7fd4b90, linux_tid = 3b8a thread b enter pid = 3B89, posix_tid = b75d3b90, linux_tid = 3b8b the main close 通过这个函数我们可以发现posix提供的这个ID不是很有规律...