![]() |
posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
|
POSIX Signals option group. More...
Files | |
| file | string.h |
| <string.h>: POSIX extensions to the C string library | |
Functions | |
| int | kill (pid_t pid, int sig) |
| Send a signal to a process or process group. | |
| int | killpg (pid_t pgrp, int sig) |
| Send a signal to a process group (XSI extension). | |
| void | psiginfo (const siginfo_t *info, const char *message) |
| Print a signal description with additional siginfo_t context. | |
| void | psignal (int sig, const char *message) |
| Print a signal description to stderr. | |
| int | sigaction (int sig, const struct sigaction *ZRESTRICT act, struct sigaction *ZRESTRICT oact) |
| Examine and change a signal action. | |
| int | sigaddset (sigset_t *set, int sig) |
| Add a signal to a signal set. | |
| int | sigaltstack (const stack_t *ZRESTRICT ss, stack_t *ZRESTRICT oss) |
| Set or get the alternate signal stack (XSI extension). | |
| int | sigdelset (sigset_t *set, int sig) |
| Delete a signal from a signal set. | |
| int | sigemptyset (sigset_t *set) |
| Initialise a signal set to the empty set. | |
| int | sigfillset (sigset_t *set) |
| Initialise a signal set to the full set (all signals). | |
| int | sighold (int sig) |
| Add a signal to the calling process's signal mask (XSI, obsolescent). | |
| int | sigignore (int sig) |
| Set a signal's disposition to SIG_IGN (XSI, obsolescent). | |
| int | siginterrupt (int sig, int flag) |
| Control whether a signal restarts or interrupts system calls (XSI, obsolescent). | |
| int | sigismember (const sigset_t *set, int sig) |
| Test whether a signal is a member of a signal set. | |
| int | sigpause (int sig) |
| Suspend execution until a signal is delivered (XSI, obsolescent). | |
| int | sigpending (sigset_t *set) |
| Retrieve the set of pending signals. | |
| int | sigprocmask (int how, const sigset_t *ZRESTRICT set, sigset_t *ZRESTRICT oset) |
| Examine and change the calling process's signal mask. | |
| int | sigrelse (int sig) |
| Remove a signal from the process signal mask (XSI, obsolescent). | |
| sighandler_t | sigset (int sig, sighandler_t disp) |
| Set the disposition of a signal, optionally blocking it first (XSI, obsolescent). | |
| int | sigsuspend (const sigset_t *set) |
| Wait for a signal, atomically replacing the process signal mask. | |
| int | sigwait (const sigset_t *ZRESTRICT set, int *ZRESTRICT sig) |
| Wait for a signal from a set. | |
| char * | strsignal (int signo) |
| Return a string describing a signal number. | |
| unsigned int | alarm (unsigned int seconds) |
| Schedule an alarm signal (SIGALRM) after a given number of seconds. | |
| int | pause (void) |
| Suspend process execution until a signal is received. | |
POSIX Signals option group.
Covers alarm(), pause(), kill(), sigaction(), sigprocmask(), sigsuspend(), sigpending(), and related signal-handling functions.
Schedule an alarm signal (SIGALRM) after a given number of seconds.
| int kill | ( | pid_t | pid, |
| int | sig | ||
| ) |
Send a signal to a process or process group.
| pid | Target process ID (positive), process group (negative), or 0. |
| sig | Signal number, or 0 to check process existence. |
| int killpg | ( | pid_t | pgrp, |
| int | sig | ||
| ) |
Send a signal to a process group (XSI extension).
| pgrp | Process group ID (0 = calling process's group). |
| sig | Signal number. |
| int pause | ( | void | ) |
Suspend process execution until a signal is received.
| void psiginfo | ( | const siginfo_t * | info, |
| const char * | message | ||
| ) |
Print a signal description with additional siginfo_t context.
| info | Signal information. |
| message | Prefix string. |
| void psignal | ( | int | sig, |
| const char * | message | ||
| ) |
Print a signal description to stderr.
| sig | Signal number. |
| message | Prefix string. |
Examine and change a signal action.
| sig | Signal number. |
| act | New action, or NULL to query. |
| oact | Output: previous action, or NULL. |
| int sigaddset | ( | sigset_t * | set, |
| int | sig | ||
| ) |
Add a signal to a signal set.
| set | Signal set. |
| sig | Signal number to add. |
Set or get the alternate signal stack (XSI extension).
| ss | New alternate stack descriptor, or NULL. |
| oss | Output: previous descriptor, or NULL. |
| int sigdelset | ( | sigset_t * | set, |
| int | sig | ||
| ) |
Delete a signal from a signal set.
| set | Signal set. |
| sig | Signal number to remove. |
| int sigemptyset | ( | sigset_t * | set | ) |
Initialise a signal set to the empty set.
| set | Signal set to clear. |
| int sigfillset | ( | sigset_t * | set | ) |
Initialise a signal set to the full set (all signals).
| set | Signal set to fill. |
| int sighold | ( | int | sig | ) |
Add a signal to the calling process's signal mask (XSI, obsolescent).
| sig | Signal to block. |
| int sigignore | ( | int | sig | ) |
Set a signal's disposition to SIG_IGN (XSI, obsolescent).
| sig | Signal to ignore. |
| int siginterrupt | ( | int | sig, |
| int | flag | ||
| ) |
Control whether a signal restarts or interrupts system calls (XSI, obsolescent).
| sig | Signal number. |
| flag | Non-zero to interrupt; 0 to restart. |
| int sigismember | ( | const sigset_t * | set, |
| int | sig | ||
| ) |
Test whether a signal is a member of a signal set.
| set | Signal set to query. |
| sig | Signal number to test. |
| int sigpause | ( | int | sig | ) |
Suspend execution until a signal is delivered (XSI, obsolescent).
| sig | Signal whose blocking is temporarily removed. |
errno set to EINTR. | int sigpending | ( | sigset_t * | set | ) |
Retrieve the set of pending signals.
| set | Output: set of signals pending delivery to the calling process. |
Examine and change the calling process's signal mask.
| how | SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK. |
| set | Signal set to apply, or NULL. |
| oset | Output: previous mask, or NULL. |
| int sigrelse | ( | int | sig | ) |
Remove a signal from the process signal mask (XSI, obsolescent).
| sig | Signal to unblock. |
| sighandler_t sigset | ( | int | sig, |
| sighandler_t | disp | ||
| ) |
Set the disposition of a signal, optionally blocking it first (XSI, obsolescent).
| sig | Signal number. |
| disp | New disposition (SIG_DFL, SIG_IGN, SIG_HOLD, or a handler). |
| int sigsuspend | ( | const sigset_t * | set | ) |
Wait for a signal, atomically replacing the process signal mask.
| set | New signal mask to apply while waiting. |
errno set to EINTR. | int sigwait | ( | const sigset_t *ZRESTRICT | set, |
| int *ZRESTRICT | sig | ||
| ) |
Wait for a signal from a set.
| set | Output signal set to wait on. |
| sig | Output: number of the accepted signal. |
| char * strsignal | ( | int | signo | ) |
Return a string describing a signal number.
Returns a pointer to a locale-specific message string describing the signal whose number is signo. The contents of the string pointed to by the return value must not be modified by the application. The returned pointer may be invalidated by a subsequent call to strsignal().
| signo | Signal number. |
signo is an unknown signal number.