SIGUSR2 SIGUSR2 SIGUSR2 SIGUSR2 SIGUSR2
| | | | |
being handled Pending Canceld Canceld Canceld
need 1 sec
there’s only one pending signal all the time. other same type signals will be canceled.
if you modify code
remove sleep
/* sleep(1); */
or
send more signals
for (i = 0; i < 500000; i++)
you will get different counter output.