Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

sigwait(2) OSS System Calls Reference Manual
To use this function in a 64-bit threaded application on systems running H06.24 or later RVUs or
J06.13 or later RVUs, you must perform all of the following tasks to make the function thread-
aware in a multi-threaded application:
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
Compile the application using the -Wlp64 compiler command option.
Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
HP recommends that you do not specify threads to wait for process-level signals such as
SIGCONT, SIGTTIN, SIGTTOU, and SIGTSTP. If a thread uses a function such as thread-
aware sigwait() or thread-aware sigsuspend( ), the thread breaks from the wait state only if the
corresponding signal is sent using the pthread_kill() function. The thread does not break from
the wait state for signals that are generated at the process level.
The SIGCHLD signal is delivered to the correct thread even though the SIGCHLD signal is
generated asynchronously.
For detailed information about writing multi-threaded and 64-bit applications for the Open Sys-
tem Services environment, see the Open System Services Programmers Guide.
RETURN VALUES
On a successful call, the signal number is returned; otherwise, [EINVAL] is returned.
ERRORS
If the only signals passed are unsupported signals, the sigwait() function returns an errno value
of [EINVAL].
For the following signals, support by the sigwait() function is dependent on the RVU runiing on
the system:
The SIGUNCP signal is supported on systems running H-series RVUs only. This signal
is not supported on systems running J-series RVUs.
The following signals are supported on systems running H06.06 or later RVUs:
SIGCHLD
SIGCONT
SIGTSTP
SIGTTIN
SIGTTOU
RELATED INFORMATION
Functions: pause(2), pthread_cancel(2), pthread_sigmask(2), sigpending(2), spt_sigwait(2).
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specification.
The use of this function with the POSIX User Thread Model library conforms to the following
industry standards:
IEEE Std 1003.1-2004, POSIX System Application Program Interface
The HP implementation does not provide the sigwaitinfo() or sigtimedwait() functions.
7110 Hewlett-Packard Company 527186-023