11 2011 档案
摘要:平台:Linux 2.6.28-19-generic书中讲解所用的linux版本为Linux 2.4.22,我没有在此版本上做实验的机会,只是在当前用的版本上做了测试,问题原因可能是Linux内核版本升级导致对线程终止的处理方式进行了改动。代码如下: 1 #include "apue.h" 2 #include <pthread.h> 3 4 void 5 cleanup(void *arg) 6 { 7 printf("cleanup: %s\n", (char *)arg); 8 } 9 10 void *11 thr_fn1(void
阅读全文