Signal Queue API.
More...
|
typedef void(* | rpmsqAction_t) (int signum, siginfo_t *info, void *context) |
| Default signal handler prototype. More...
|
|
Signal Queue API.
SIG_DFL, SIG_IGN and SIG_ERR counterparts.
Definition at line 27 of file rpmsq.h.
typedef void(* rpmsqAction_t) (int signum, siginfo_t *info, void *context) |
Default signal handler prototype.
- Parameters
-
signum | signal number |
info | (siginfo_t) signal info |
context | signal context |
Definition at line 22 of file rpmsq.h.
int rpmsqActivate |
( |
int |
state | ) |
|
Activate (or disable) the signal queue.
- Parameters
-
state | 1 to enable, 0 to disable |
- Returns
- 0 on success, negative on error
Block or unblock (almost) all signals.
The operation is "reference counted" so the calls can be nested, and signals are only unblocked when the reference count falls to zero.
- Parameters
-
- Returns
- 0 on success, -1 on error
int rpmsqIsCaught |
( |
int |
signum | ) |
|
Test if given signal has been caught (while signals blocked).
Similar to sigismember() but operates on internal signal queue.
- Parameters
-
- Returns
- 1 if caught, 0 if not and -1 on error
Poll for caught signals, executing their handlers.
- Returns
- no. active signals found
Set or delete a signal handler for a signal.
- Parameters
-
signum | signal number |
handler | signal handler or NULL to delete |
- Returns
- previous handler, RPMSQ_ERR on error