Explain the concept of a critical section in the context of signal handling. How does the example program ensure that SIGINT is not delivered during the critical section?
Critical section is that region of the code, where we don't want any signal to interrupt the running of the code. Int he example program the SIGINT program is blocked from executing while the code is in critical section. During the period while the SIGINT is blocked, pressing CTRL+C won't interrupot the functioning of program.