2013年6月8日

多进程+多线程环境下的子进程死锁问题

摘要: 已经有网友分析过这个问题,http://blog.chinaunix.net/uid-20662820-id-3422400.html。这里我自己再总结一下,代码如下: 1 #include <sys/wait.h> 2 #include <pthread.h> 3 #include <unistd.h> 4 #include <stdlib.h> 5 #include <stdio.h> 6 7 void* parentthread(void* arg) 8 { 9 //不停执行,增加死锁概率10 while(1){11 //父进程 阅读全文

posted @ 2013-06-08 00:25 浪青 阅读(635) 评论(0) 推荐(0)

导航