3 ms·
It should be noted that the example code is defective: printf() is being called inside the while loop and in the signal handler, which could lead to the printf(
by zAy0LfpBZLC8mAC 10y ago
It should be noted that the example code is defective: printf() is being called inside the while loop and in the signal handler, which could lead to the printf() in the loop being interrupted by the signal handler, which would call printf() again, but printf() is not reentrant.