Imagine I have a program with a main function that creates several threads. In each thread I redirect the CTRL + C
interruption (SIGINT
) to a functionA
via signal(SIGINT, functionA)
and in the main process I redirect the same interruption to a functionB
(signal(SIGINT, functionB
).
When the program is running and the interruption SIGINT
is sent, what will the program do?
It will execute functionA
in all threads then functionB
in the main process?