stated in the introduction of this chapter, programs running in User
Mode are allowed to send and receive signals. This means that a set
of system calls must be defined to allow these kinds of operations.
Unfortunately, for historical reasons, several system calls exist
that serve essentially the same purpose. As a result, some of these
system calls are never invoked. For instance,
sys_sigaction( ) and
sys_rt_sigaction( ) are almost
identical, so the
sigaction( ) wrapper function
included in the C library ends up invoking
sys_rt_sigaction( ) instead of
sys_sigaction( ). We shall
describe some of the most significant POSIX system calls.
kill(pid,sig) system call is commonly used to
send signals; its corresponding service routine is the
sys_kill( ) function. The integer
pid parameter has several meanings, depending on
its numerical value:
sig signal is sent to the process whose PID is
sig signal is sent to all processes in the
same group as the calling process.
The signal is sent to all processes, except
swapper (PID 0), init (PID
The signal is sent to all processes in the process group -pid.
sys_kill( ) function sets up a minimal
siginfo_t table for the signal, and then invokes
info.si_signo = sig; info.si_errno = 0; info.si_code = SI_USER; info._sifields._kill._pid = current->pid; info._sifields._kill._uid ...