libzypp 17.31.23
zypp::SigprocmaskSaver Class Reference

Exception safe sigprocmask save/restore. More...

#include <base/Signal.h>

Public Member Functions

 SigprocmaskSaver ()
 Ctor saving the original sigprocmask.
 
 ~SigprocmaskSaver ()
 Dtor restoring the original sigprocmask.
 
void block (int signum_r)
 Temporary block signal.
 
void unblock (int signum_r)
 Temporary unblock signal.
 
bool pending (int signum_r)
 Whether signal delivery is pending.
 
void suspend ()
 Wait for signals not blocked in original sigprocmask.
 

Private Attributes

::sigset_t _origmask
 

Detailed Description

Exception safe sigprocmask save/restore.

Definition at line 41 of file Signal.h.

Constructor & Destructor Documentation

◆ SigprocmaskSaver()

zypp::SigprocmaskSaver::SigprocmaskSaver ( )
inline

Ctor saving the original sigprocmask.

Definition at line 45 of file Signal.h.

◆ ~SigprocmaskSaver()

zypp::SigprocmaskSaver::~SigprocmaskSaver ( )
inline

Dtor restoring the original sigprocmask.

Definition at line 48 of file Signal.h.

Member Function Documentation

◆ block()

void zypp::SigprocmaskSaver::block ( int  signum_r)
inline

Temporary block signal.

Definition at line 52 of file Signal.h.

◆ unblock()

void zypp::SigprocmaskSaver::unblock ( int  signum_r)
inline

Temporary unblock signal.

Definition at line 60 of file Signal.h.

◆ pending()

bool zypp::SigprocmaskSaver::pending ( int  signum_r)
inline

Whether signal delivery is pending.

Definition at line 68 of file Signal.h.

◆ suspend()

void zypp::SigprocmaskSaver::suspend ( )
inline

Wait for signals not blocked in original sigprocmask.

Definition at line 75 of file Signal.h.

Member Data Documentation

◆ _origmask

::sigset_t zypp::SigprocmaskSaver::_origmask
private

Definition at line 78 of file Signal.h.


The documentation for this class was generated from the following file: