NAME
sigwait - wait for a signal
SYNOPSIS
#include <signal.h> int sigwait(const sigset_t *set, int *sig); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): sigwait(): _POSIX_C_SOURCE
DESCRIPTION
The sigwait() function suspends execution of the calling thread until one of the signals specified in the signal set set becomes pending. The function accepts the signal (removes it from the pending list of signals), and returns the signal number in sig. The operation of sigwait() is the same as sigwaitinfo(2), except that: * sigwait() returns only the signal number, rather than a siginfo_t structure describing the signal. * The return values of the two functions are different.
RETURN VALUE
On success, sigwait() returns 0. On error, it returns a positive error number (listed in ERRORS).
ERRORS
EINVAL set contains an invalid signal number.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). Interface Attribute Value sigwait() Thread safety MT-Safe
CONFORMING TO
POSIX.1-2001, POSIX.1-2008.
NOTES
sigwait() is implemented using sigtimedwait(2). The glibc implementation of sigwait() silently ignores attempts to wait for the two real-time signals that are used internally by the NPTL threading implementation. See nptl(7) for details.
EXAMPLE
See pthread_sigmask(3).
SEE ALSO
sigaction(2), signalfd(2), sigpending(2), sigsuspend(2), sigwaitinfo(2), sigsetops(3), signal(7)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
manpages/obex-data-server.1.html
obex-data-server(1) - D-Bus service providing OBEX functiona
obex-data-server is D-Bus service providing high-level OBEX client and server side functionality. It currently supports OPP (Object Push Profile), FTP (File Tra
manpages/XSetLineAttributes.3.html
XSetLineAttributes(3) - GC convenience routines (Man Page)
The XSetLineAttributes function sets the line drawing components in the specified GC. XSetLineAttributes can generate BadAlloc, BadGC, and BadValue errors. The
manpages/pthread_attr_setstackaddr.3.html
pthread_attr_setstackaddr(3) - set/get stack address attribu
These functions are obsolete: do not use them. Use pthread_attr_setstack(3) and pthread_attr_getstack(3) instead. The pthread_attr_setstackaddr() function sets
manpages/XGetWMNormalHints.3.html
XGetWMNormalHints(3) - allocate size hints structure and set
The XAllocSizeHints function allocates and returns a pointer to a XSizeHints structure. Note that all fields in the XSizeHints structure are initially set to ze
manpages/getrlimit.2.html
getrlimit(2) - get/set resource limits - Linux manual page
The getrlimit() and setrlimit() system calls get and set resource limits respectively. Each resource has an associated soft and hard limit, as defined by the rl
manpages/XtIsShell.3.html
XtIsShell(3) - obtain and verify a widget's class (ManPage)
The XtClass function returns a pointer to the widgets class structure. The XtSuperclass function returns a pointer to the widgets superclass class structure. Th
manpages/anvil.8.html
anvil(8) - Postfix session count and request rate control...
The Postfix anvil(8) server maintains statistics about client connection counts or client request rates. This information can be used to defend against clients
manpages/symlink.2.html
symlink(2) - make a new name for a file - Linux manual page
symlink() creates a symbolic link named linkpath which contains the string target. Symbolic links are interpreted at run time as if the contents of the link had
manpages/prtstat.1.html
prtstat(1) - print statistics of a process - Linux man page
prtstat prints the statistics of the specified process. This information comes from the /proc/PID/stat file. OPTIONS -r,--raw Print the information in raw forma
manpages/dbopen.3.html
dbopen(3) - database access methods - Linux manual page.....
Note well: This page documents interfaces provided in glibc up until version 2.1. Since version 2.2, glibc no longer provides these interfaces. Probably, you ar
manpages/Tcl_ConditionWait.3.html
Tcl_ConditionWait(3) - Tcl thread support - Linux man page
Tcl provides Tcl_CreateThread for creating threads. The caller can determine the size of the stack given to the new thread and modify the behaviour through the
manpages/systemd.device.5.html
systemd.device(5) - systemd device configuration files......
A unit configuration file whose name ends in .device encodes information about a device unit as exposed in the sysfs/udev(7) device tree. This unit type has no
