struct sighand_struct {

atomic_t count;

struct k_sigaction action[_NSIG];

count holds the number of processes that share the instance. As described in Chapter 2, it is possible to specify in the clone operation that parent and child process share the same signal handler so that there is no need to copy the data structure.

The installed signal handlers are held in the action array that has _nsig elements. _nsig specifies the number of different signals that can be handled. This figure is 64 on most platforms, but there are exceptions — Mips, for instance, which supports 128 signals.

Each element contains an instance of the k_sigaction structure to specify the properties of a signal as seen by the kernel. On some platforms, the kernel has more information on signal handlers than is available for userspace applications. Normally, k_sigaction has a single element that includes the familiar sigaction structure.

Continue reading here: Info

Was this article helpful?

0 0