gcc 编译时使用了POSIX thread程序时,为了使用thread-safe库的头文件,必须加-lpthread 加-static 表示静态链接静态库 exit()是进程退出,调用后则线程也退出了