Can I stop(pause) pthread execution using pthread_kill

孤者浪人 提交于 2019-12-12 07:19:01

问题


Will a thread stop if I send it SIGTSTP signal? Or in other words will it behave like process on SIGTSTP and SIGCONT?

Thanks in advance.


回答1:


From `man 3p pthread_kill:

Note that pthread_kill() only causes the signal to be handled in the context of the given thread; the signal action (termination or stopping) affects the process as a whole.

So I'd say that you will stop the whole process, not just the thread.



来源:https://stackoverflow.com/questions/11046720/can-i-stoppause-pthread-execution-using-pthread-kill

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!