signals: kill, sigaction, masks.
More...
Go to the source code of this file.
|
| int | sigaction (int sig, const struct sigaction *act, struct sigaction *oldact) |
| | read and change what the process does with a signal.
|
| sighandler_t | signal (int sig, sighandler_t handler) |
| | set a handler (with SA_RESTART, as BSD signal() does).
|
| int | kill (pid_t pid, int sig) |
| | send a signal to a process (pid > 0) or every process but init (-1).
|
| int | raise (int sig) |
| | send a signal to the calling process.
|
| int | sigprocmask (int how, const sigset_t *set, sigset_t *oldset) |
| | read and change the blocked mask.
|
| int | sigpending (sigset_t *set) |
| | the signals that are blocked and pending.
|
| int | sigsuspend (const sigset_t *mask) |
| | wait for a signal with a temporary mask.
|
| int | sigemptyset (sigset_t *set) |
| int | sigfillset (sigset_t *set) |
| int | sigaddset (sigset_t *set, int sig) |
| int | sigdelset (sigset_t *set, int sig) |
| int | sigismember (const sigset_t *set, int sig) |
signals: kill, sigaction, masks.
the numbers, flags and the kernel's sigaction layout are ABI and must match src/kernel/signal/signal.h exactly.
◆ SIGHUP
◆ SIGINT
◆ SIGQUIT
◆ SIGILL
◆ SIGTRAP
◆ SIGABRT
◆ SIGBUS
◆ SIGFPE
◆ SIGKILL
◆ SIGUSR1
◆ SIGSEGV
◆ SIGUSR2
◆ SIGPIPE
◆ SIGALRM
◆ SIGTERM
◆ SIGCHLD
◆ SIGCONT
◆ SIGSTOP
◆ SIGTSTP
◆ SIGTTIN
◆ SIGTTOU
◆ SIGURG
◆ SIGVTALRM
◆ SIGPROF
◆ SIGWINCH
◆ NSIG
◆ SIG_DFL
◆ SIG_IGN
◆ SIG_ERR
◆ SA_NOCLDSTOP
| #define SA_NOCLDSTOP 0x00000001 |
◆ SA_RESTORER
| #define SA_RESTORER 0x04000000 |
◆ SA_RESTART
| #define SA_RESTART 0x10000000 |
◆ SA_NODEFER
| #define SA_NODEFER 0x40000000 |
◆ SA_RESETHAND
| #define SA_RESETHAND 0x80000000 |
◆ SIG_BLOCK
◆ SIG_UNBLOCK
◆ SIG_SETMASK
◆ sigset_t
◆ sig_atomic_t
◆ sighandler_t
| typedef void(*) sighandler_t(int) |
◆ sigaction()
| int sigaction |
( |
int | sig, |
|
|
const struct sigaction * | act, |
|
|
struct sigaction * | oldact ) |
read and change what the process does with a signal.
- Returns
- 0, or -1 (errno set; EINVAL for SIGKILL and SIGSTOP).
◆ signal()
set a handler (with SA_RESTART, as BSD signal() does).
- Returns
- the old handler, or SIG_ERR.
◆ kill()
| int kill |
( |
pid_t | pid, |
|
|
int | sig ) |
send a signal to a process (pid > 0) or every process but init (-1).
- Returns
- 0, or -1 (errno set).
◆ raise()
send a signal to the calling process.
◆ sigprocmask()
read and change the blocked mask.
◆ sigpending()
the signals that are blocked and pending.
◆ sigsuspend()
wait for a signal with a temporary mask.
always returns -1 with EINTR.
◆ sigemptyset()
◆ sigfillset()
◆ sigaddset()
| int sigaddset |
( |
sigset_t * | set, |
|
|
int | sig ) |
◆ sigdelset()
| int sigdelset |
( |
sigset_t * | set, |
|
|
int | sig ) |
◆ sigismember()
| int sigismember |
( |
const sigset_t * | set, |
|
|
int | sig ) |