Hi,
So, I'm attaching my code.
The code create 3 sons (with fork).
Then each son create 3 grand sons (with thread).
What I'm failing to do is to send to a son (started with fork) a USR1 signal , which will make all its grand sons to exit immediatly (and not wait to the grand sons to exit after they finish their work).
I want to send the USR1 signal from outside to the son PID.
I know there is a limitation and I might can not do that, but do other here another clean way to exit threads of the son immediatly when son gets USR1 signal ?
Thanks !
Here is the code , the goal is to make the threads to exit while sleep function starting :