signal.h
Overview
Related Modules:
Description:
Provides signal operation functions and structures, including changing the signal processing mode and the process signal mask set.
Since:
1.0
Version:
1.0
Summary
Data Structures
Macros
Stops a child process without sending the SIGCHLD signal. |
|
Sets the SIGCHLD flag to prevent zombie processes. |
|
SA_ONSTACK 0x08000000 |
Uses the signal stack specified by sigaltstack for signal processing. |
SA_RESTART 0x10000000 |
|
SA_NODEFER 0x40000000 |
The signals being processed are not masked during signal processing. |
SA_RESETHAND 0x80000000 |
The default processing mode is restored after the signal processing is complete. |
SA_RESTORER 0x04000000 |
Not intended for application use. This flag is used by C libraries to indicate that the sa_restorer field contains the address of a trampoline. |
MINSIGSTKSZ 2048 |
|
SIGSTKSZ 8192 |
|
_NSIG 65 |
|
SIGHUP 1 |
|
SIGINT 2 |
|
SIGQUIT 3 |
|
SIGILL 4 |
|
SIGTRAP 5 |
|
SIGABRT 6 |
|
SIGIOT 6 |
Equivalent to SIGABRT. |
SIGBUS 7 |
|
SIGFPE 8 |
|
SIGKILL 9 |
|
SIGUSR1 10 |
|
SIGSEGV 11 |
|
SIGUSR2 12 |
|
SIGPIPE 13 |
|
SIGALRM 14 |
|
SIGTERM 15 |
|
SIGSTKFLT 16 |
|
SIGCHLD 17 |
|
SIGCONT 18 |
|
SIGSTOP 19 |
|
SIGTSTP 20 |
|
SIGTTIN 21 |
|
SIGTTOU 22 |
|
SIGURG 23 |
|
SIGXCPU 24 |
|
SIGXFSZ 25 |
|
SIGVTALRM 26 |
Virtual timer, used to calculate the CPU occupation time of a process. |
SIGPROF 27 |
Calculates the CPU time occupied by a process and the system calling time. |
SIGWINCH 28 |
|
SIGIO 29 |
|
Equivalent to SIGIO. |
|
SIGPWR 30 |
|
SIGSYS 31 |
|
SIGUNUSED 31 |
Equivalent to SIGSYS. |
SIGRTMIN 32 |
|
SA_NOCLDSTOP 0x00000001 |
Stops a child process without sending the SIGCHLD signal. |
SA_NOCLDWAIT 0x00000002 |
Sets the SIGCHLD flag to prevent zombie processes. |
SA_SIGINFO 0x00000004 |
|
SA_THIRTYTWO 0x02000000 |
Transfers signals in a 32-bit mode even if the task runs in a 26-bit mode. |
SA_RESTORER 0x04000000 |
Not intended for application use. This flag is used by C libraries to indicate that the sa_restorer field contains the address of a trampoline. |
SA_ONSTACK 0x08000000 |
Uses the signal stack specified by sigaltstack for signal processing. |
SA_RESTART 0x10000000 |
|
SA_NODEFER 0x40000000 |
The signals being processed are not masked during signal processing. |
SA_RESETHAND 0x80000000 |
The default processing mode is restored after the signal processing is complete. |
Signals being processed are not masked during signal processing. |
|
The default processing mode is restored after the signal processing is complete. |
|
MINSIGSTKSZ 2048 |
|
SIGSTKSZ 8192 |
|
Defines the function behaviors such as sigprocmask() and pthread_sigmask(), which are used to add signals to the mask set. |
|
Defines the function behaviors such as sigprocmask() and pthread_sigmask(), which are used to remove signals from the mask set. |
|
Defines the function behaviors such as sigprocmask() and pthread_sigmask(), which are used to set the mask set. |
|
sa_handler _u._sa_handler |
Defines the simplified writing used to indicate the sa_handler.sa_handler field in sigaction. |
sa_sigaction _u._sa_sigaction |
Defines the simplified writing used to indicate the sa_handler.sa_sigaction field in sigaction. |
SIG_HOLD ((void (*)(int)) 2) |
Defines the function behaviors such as sigset() and adds a specified signal to the process signal mask without changing the current processing mode of the signal. |
sa_handler sa_handler.sa_handler |
Defines the simplified writing used to indicate the sa_handler.sa_handler field in sigaction. |
sa_sigaction sa_handler.sa_sigaction |
Defines the simplified writing used to indicate the sa_handler.sa_sigaction field in sigaction. |
Sets the notification method in sigevent: signal notification. |
|
Sets the notification method in sigevent: no notification. |
|
Sets the notification method in sigevent: thread notification. |
|
SIGRTMIN (libc_current_sigrtmin()) |
|
SIGRTMAX (libc_current_sigrtmax()) |
|
SIG_ERR ((sighandler_t)-1) |
Defines the value returned when a function such as signal() fails. |
SIG_DFL ((sighandler_t)0) |
|
SIG_IGN ((sighandler_t)1) |
Defines the signal processing mode in which the signal is ignored. |
Typedefs
typedef struct __ucontext |
|
typedef struct sigaltstack |
|
sighandler_t) (int) |
Functions
kill (pid_t pid, int sig) |
|
sigemptyset (sigset_t set) |
|
sigfillset (sigset_t set) |
|
sigaddset (sigset_t set, int signum) |
|
sigdelset (sigset_t set, int signum) |
|
sigismember (const sigset_t set, int signum) |
|
sigprocmask (int how, const sigset_t restrict set, sigset_t *restrict oldset) |
|
sigsuspend (const sigset_t mask) |
Sets mask as the signal mask set of the current process and suspends the process until a signal processing action is triggered. |
sigaction (int signum, const struct sigaction restrict act, struct sigaction *restrict oldact) |
Checks or changes the processing action associated with a specified signal. Do not use the process creation function or thread creation function in the registered callback processing function. Otherwise, the process is abnormal. For example, do not use the fork or pthread_create function. |
sigpending (sigset_t set) |
|
sigwait (const sigset_t restrict set, int *restrict sig) |
|
sigwaitinfo (const sigset_t __restrict set, siginfo_t restrict info) |
Suspends the calling thread and waits for the signal, with a timeout period specified. |
sigtimedwait (const sigset_t *restrict set, siginfo_t __restrict info, const struct timespec restrict timeout) |
Suspends the calling thread and waits for the signal, with a timeout period specified. |
pthread_sigmask (int how, const sigset_t *restrict set, sigset_t __restrict oldset) |
|
psignal (int signum, const char s) |
|
sigpause (int signum) |
Deletes the signal specified by signum from the signal mask of the calling process and suspends the process until the signal is received. |
sighold (int signum) |
Adds the signal specified by signum to the signal mask of the calling process. |
sigrelse (int signum) |
Deletes the signal specified by signum from the signal mask of the calling process. |
sigisemptyset (const sigset_t set) |
|
sigorset (sigset_t dest, const sigset_t left, const sigset_t right) |
|
sigandset (sigset_t dest, const sigset_t left, const sigset_t *right) |
|
signal (int signum, sighandler_t handler) |
Changes the processing action of a specified signal. Do not use the process creation function or thread creation function in the registered callback processing function. Otherwise, the process is abnormal. For example, do not use the fork or pthread_create function. |
raise (int signum) |