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/signalwaitinfo.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/signalwaitinfo.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/signalwaitinfo.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/signalwaitinfo.html on line 8

SignalWaitinfo(), SignalWaitinfo_r()

Select a pending signal

Synopsis:

#include <sys/neutrino.h>

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

int SignalWaitinfo_r( 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 SignalWaitinfo() and SignalWaitinfo_r() kernel calls select the pending signal from the set specified by set. If no signal in set is pending at the time of the call, the thread blocks until one or more signals in set become pending or until interrupted by an unblocked, caught signal.

These functions are identical except in the way they indicate errors. See the Returns section for details.


Note: Instead of using these kernel calls directly, consider calling sigwaitinfo().

If the info argument isn't NULL, information on the selected signal is stored there as follows:

siginfo_t member Description
si_signo Selected signal number
si_code Signal code
si_value Signal value

If, while SignalWaitinfo() is waiting, a caught signal occurs that isn't blocked, the signal handler is invoked and SignalWaitinfo() is interrupted with an error of EINTR.

Blocking states

STATE_SIGWAITINFO
The calling thread blocks waiting for a signal.

Returns:

The only difference between these functions is the way they indicate errors:

SignalWaitinfo()
A signal number. If an error occurs, -1 is returned and errno is set.
SignalWaitinfo_r()
A signal number. This function does NOT set errno. If an error occurs, the negative of a value from the Errors section is returned.

Errors:

EINTR
The call was interrupted by a signal.
EFAULT
A fault occurred when the kernel tried to access the buffers provided.
ETIMEDOUT
A kernel timeout unblocked the call. See TimerTimeout().

Classification:

QNX Neutrino

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

See also:

SignalKill(), SignalKill_r(), sigwaitinfo()


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/signalwaitinfo.html on line 210

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/signalwaitinfo.html on line 210