Code in question first (minimized case):
#include #include int counter = 0; void react_to_signal(int n) { fprintf(stde
You may need to fflush stderr to get the message to write before the program exits.