rpm  4.18.0
Macros | Typedefs | Functions
Signal Queue API.

Signal Queue API. More...

Collaboration diagram for Signal Queue API.:

Macros

#define RPMSQ_DFL   ((rpmsqAction_t)0)
 SIG_DFL, SIG_IGN and SIG_ERR counterparts. More...
 

Typedefs

typedef void(* rpmsqAction_t) (int signum, siginfo_t *info, void *context)
 

Functions

RPM_GNUC_DEPRECATED int rpmsqIsCaught (int signum)
 
RPM_GNUC_DEPRECATED int rpmsqActivate (int state)
 Activate (or disable) the signal queue. More...
 
RPM_GNUC_DEPRECATED rpmsqAction_t rpmsqSetAction (int signum, rpmsqAction_t handler)
 
int rpmsqBlock (int op)
 Block or unblock (almost) all signals. More...
 
RPM_GNUC_DEPRECATED int rpmsqPoll (void)
 
RPM_GNUC_DEPRECATED void rpmsqSetInterruptSafety (int on)
 

Detailed Description

Signal Queue API.

Macro Definition Documentation

◆ RPMSQ_DFL

#define RPMSQ_DFL   ((rpmsqAction_t)0)

SIG_DFL, SIG_IGN and SIG_ERR counterparts.

Definition at line 29 of file rpmsq.h.

Typedef Documentation

◆ rpmsqAction_t

typedef void(* rpmsqAction_t) (int signum, siginfo_t *info, void *context)
Deprecated:
Obsolete, do not use.

Default signal handler prototype.

Parameters
signumsignal number
info(siginfo_t) signal info
contextsignal context

Definition at line 24 of file rpmsq.h.

Function Documentation

◆ rpmsqActivate()

RPM_GNUC_DEPRECATED int rpmsqActivate ( int  state)

Activate (or disable) the signal queue.

Parameters
state1 to enable, 0 to disable
Returns
0 on success, negative on error

◆ rpmsqBlock()

int rpmsqBlock ( int  op)

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
opSIG_BLOCK/SIG_UNBLOCK
Returns
0 on success, -1 on error

◆ rpmsqIsCaught()

RPM_GNUC_DEPRECATED int rpmsqIsCaught ( int  signum)
Deprecated:
Obsolete, do not use.

Test if given signal has been caught (while signals blocked). Similar to sigismember() but operates on internal signal queue.

Parameters
signumsignal to test for
Returns
1 if caught, 0 if not and -1 on error

◆ rpmsqPoll()

RPM_GNUC_DEPRECATED int rpmsqPoll ( void  )
Deprecated:
Obsolete, do not use.

Poll for caught signals, executing their handlers.

Returns
no. active signals found

◆ rpmsqSetAction()

RPM_GNUC_DEPRECATED rpmsqAction_t rpmsqSetAction ( int  signum,
rpmsqAction_t  handler 
)
Deprecated:
Obsolete, do not use.

Set or delete a signal handler for a signal.

Parameters
signumsignal number
handlersignal handler or NULL to delete
Returns
previous handler, RPMSQ_ERR on error

◆ rpmsqSetInterruptSafety()

RPM_GNUC_DEPRECATED void rpmsqSetInterruptSafety ( int  on)
Deprecated:
Obsolete, do not use.