Add rpmsqIsCaught() for testing if a signal has been caught
This commit is contained in:
parent
df206dbaaf
commit
cd040ba59b
|
@ -171,6 +171,11 @@ static struct rpmsig_s {
|
|||
{ -1, NULL },
|
||||
};
|
||||
|
||||
int rpmsqIsCaught(int signum)
|
||||
{
|
||||
return sigismember(&rpmsqCaught, signum);
|
||||
}
|
||||
|
||||
void rpmsqAction(int signum,
|
||||
void * info, void * context)
|
||||
{
|
||||
|
|
|
@ -53,6 +53,14 @@ struct rpmsqElem {
|
|||
|
||||
extern sigset_t rpmsqCaught;
|
||||
|
||||
/** \ingroup rpmsq
|
||||
* Test if given signal has been caught (while signals blocked).
|
||||
* Similar to sigismember() but operates on internal signal queue.
|
||||
* @param signum signal to test for
|
||||
* @return 1 if caught, 0 if not and -1 on error
|
||||
*/
|
||||
int rpmsqIsCaught(int signum);
|
||||
|
||||
/** \ingroup rpmsq
|
||||
* Default signal handler.
|
||||
* @param signum signal number
|
||||
|
|
Loading…
Reference in New Issue