Q. What is blocking a signal ?

A. Blocking a signal means telling the Linux OS to hold the signal and  deliver it later when signal is Unblocked.


Q. How to block a signal?

A. sigprocmask() is used to 'BLOCK' and 'UNBLOCK' using the first parameter SIG_BLOCK or SIG_UNBLOCK respectively.


Q. can all signals in linux be ignored?

A. No. There are few signals that cannot be ignored ex: SIGKILL.


Q. How to generate SIGALRM signal?

A. alarm() system call generates SIGALRM signal.


Q. what are condition variables?

A. Condition variables along with mutex,  are used to signal the changes from one thread to other thread.

pthread_cond_signal() used in one thread and pthread_cond_wait() used in other waiting thread to implement above.