Can I stop(pause) pthread execution using pthread_kill

后端 未结 1 1710
自闭症患者
自闭症患者 2021-01-06 05:18

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条回答
  • 2021-01-06 05:49

    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.

    0 讨论(0)
提交回复
热议问题