Saturday, October 11, 2014

Unix Prog: Reliable-Signal Terminology and Semantics

1. Signal Generation And Delivery

When the signal is generated, the kernel usually sets a flag of some form in the process table. Then it will not be lost become of some reason.
The signal is delivered to a process when the action for a signal is taken.
During the time between the generation of a signal and its delivery, the signal is said to be pending.

2. Process block signals

If a signal that is blocked is generated for a process, and if the action for that signal is either the default action or to catch the signal, then the signal remains pending for the process until the process either a) unblocks the signal or b) changes the action to ignore the signal

3. Signals Queue

If the signal is generated more than once for one process during the time process block this signal. Depending on different implementations, it may just deliver the latest one for once, or queue the signals and deliver them one by one in the future.

4. Order of signals delivery

If there are more than one signals delivered to the process, the POSIX.1 suggests that the signals related to the current state of the process be delivered before other signals. But the standard doesn't specify the exact order of signal delivery.

5. Signal Mask

Each process has a signal mask that defines the set of signals currently blocked from delivery to that process. We can think of this mask as having one bit for each possible signal. sigprocmask system call is used to change the signal mask of the process.

No comments:

Post a Comment