I am writing a simple program in which the parent and child processes are alternatively printed to a file. I managed to do this using custom signals. Now I want to process the SIGINT signal. After receiving ctrl-c, the parent must send a completion signal to the child, then it must terminate the child, and finally the parent must complete.
My question is that for this work to work correctly, I should receive the SIGINT signal ONLY from the parent, and IGNORE from the child. It is right? If so, are there any hints of this?
c signals
Spyrosr
source share