Signal data structures
The kernel maintains per-process signal data structures to keep track of, signal disposition,blocked signals, and pending signal queues. The process task structure contains appropriate references to these data structures:
struct task_struct {
....
....
....
/* signal handlers */
struct signal_struct *signal;
struct sighand_struct *sighand;
sigset_t blocked, real_blocked;
sigset_t saved_sigmask; /* restored if set_restore_sigmask() was used */
struct sigpending pending;
unsigned long sas_ss_sp;
size_t sas_ss_size;
unsigned sas_ss_flags;
....
....
....
....
};Signal descriptors
Recall from our earlier discussions in the first chapter that Linux supports multi-threaded applications through lightweight processes. All LWPs of a threaded application are part of a process group and share signal handlers; each LWP (thread) maintains its own pending, and blocked signal queues.
The signal pointer of the task structure refers to the instance of type signal_struct...