Tinyhttpd icon indicating copy to clipboard operation
Tinyhttpd copied to clipboard

为什么线程不用设置成游离态呢?

Open UKeeySDis opened this issue 7 years ago • 4 comments

如题,这种多线程的网络服务器代码,没有收回线程,为什么不用设置成游离态呢?求大神解答。

UKeeySDis avatar Apr 26 '17 09:04 UKeeySDis

发现一个问题,线程没有join, 用ctrl-c结束httpd后,成了僵尸进程,无法杀掉。

chenpoyang avatar Sep 22 '17 07:09 chenpoyang

@UKeeySDis 线程需要特殊回收?线程游离态是什么?

lanthree avatar Oct 23 '17 08:10 lanthree

@chenpoyang 线程怎么变成的进程?

lanthree avatar Oct 23 '17 08:10 lanthree

刚学习也发现这个问题了,还有一种解决方法pthread_detacd()

changyl avatar Jan 15 '20 09:01 changyl