
Signal Handlers - stdio


printf uses buffers internally

imagine your program receives a SIGHUP while it does a printf("%d", 1);
printf is halfway through changing some internal data structures

your signal handler calls printf, uses the very same data structures, and returns to the main program


