I start a pthread then I have a main loop inside my main process. From the main loop, I would like to pause the execution of the thread then resume it later. I’ve try using pthread_kill(thread,SIGSTOP) then later pthread_kill(thread, SIGCONT) but not only the thread stop. The hole process does and that’s not what I’m looking for. I only want to pause a given thread. Is it possible? How can I do that without adding pthread code inside the thread function? I’ve read that SIGSTOP cannot be masked like SIGKILL.
Any suggestion are welcome,