SIGINT handler with Fork()
i have a program that forks-off a child process. I want to override SIGINT handler. Means when user breaks the program with ctrl+c my handler will run.
I have done it but my handler runs twice one for parent, one for child process i think.
What must i do to prevent this? I want to deallocate memory and exit the child and parent processes.
Do u have any solutions?
Thanks in advance.