linux上,c语言中,主进程怎么杀死子线程

linux上,c语言中,主进程怎么杀死子线程

用pthread.h中声明的函数可实现线程管理。

创建线程是pthread_create()函数;

撤销线程是pthread_cancel()函数,这个应该符合你的要求。