#include <signal.h> int Qp0sEnableSignals( void );
The Qp0sEnableSignals() function enables the process to receive signals.
The Qp0sEnableSignals() function causes the process signal vector to be initialized for the set of supported signals. The signal handling action for each supported signal is set to the default action, as defined by sigaction() (see sigaction()--Examine and Change Signal Action). The signal blocking mask of the calling thread is set to the empty signal set (see sigemptyset()--Initialize and Empty Signal Set).
If the process is currently enabled for signals, a call to the Qp0sEnableSignals() has no effect. That is, the process signal vector and the signal blocking mask of the calling thread are unchanged and an [EALREADY] error is returned.
None.
None
0 | Qp0sEnableSignals() was successful. |
-1 | Qp0sEnableSignals() was not successful. The errno variable is set to indicate the error. |
If Qp0sEnableSignals() is not successful, errno usually indicates one of the following errors. Under some conditions, errno could indicate an error other than those listed here.
Operation already in progress.
The calling process is currently enabled for signals.
Process not enabled for signals.
An attempt was made to call a signal function under one of the following conditions:
Use of the following functions enable a process for signals:
Any of the Pthread APIs. See Pthread APIs for more information.
See Code disclaimer information for information pertaining to code examples.
The following example shows how a process can reset its signal vector and signal blocking mask:
#include <signal.h> #include <errno.h> int resetSignals( void ) { int return_value; return_value = Qp0sEnableSignals(); if( return_value == -1 ) { Qp0sDisableSignals(); return_value = Qp0sEnableSignals(); } return( return_value ); }
Top | UNIX-Type APIs | APIs by category |