Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/sigwaitinfo.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/sigwaitinfo.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/sigwaitinfo.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/sigwaitinfo.html on line 8

sigwaitinfo()

Wait for a specified signal and return its information

Synopsis:

#include <signal.h>

int sigwaitinfo ( const sigset_t *set,
                  siginfo_t *info );

Arguments:

set
A pointer to a sigset_t object that specifies the signals you want to wait for.
info
NULL, or a pointer to a siginfo_t structure where the function can store information about the signal.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The sigwaitinfo() function selects a pending signal from set, atomically clears it from the set of pending signals in the system, and returns that signal number.

If there's no pending signal, sigwaitinfo() blocks until the specified signal is pending. If the specified signal is already pending, upon call to sigwaitinfo(), the call immediately returns without blocking.

If info is NULL, the selected signal is returned by sigwaitinfo(); otherwise, the selected signal is stored in the si_signo member of info and the cause of the signal is stored in the si_code member.

If any value is queued to the selected signal, the first queued value is dequeued and, if the info argument is non-NULL, the value is stored in the si_value member of info. The system resources used to queue the signal are released and made available to queue other signals. If no value is queued, the content of the si_value member is undefined.

If no further signals are queued for the selected signal, the pending indication for that signal is reset.

Returns:

A signal number, or -1 if an error occurred (errno is set).

Errors:

EFAULT
A fault occurred while accessing the buffers.
EINTR
The wait was interrupted by an unblocked, caught signal.

Classification:

POSIX 1003.1 RTS

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pause(), pthread_sigmask(), sigaction(), sigaddset(), sigdelset(), sigemptyset(), sigfillset(), SignalWaitinfo(), sigpending(), sigsuspend(), sigtimedwait(), sigwait()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/sigwaitinfo.html on line 175

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/sigwaitinfo.html on line 175