8 #define SCARAB_API_EXPORTS 26 LOGGER( slog,
"signal_handler" );
40 throw error() <<
"Unable to handle SIGINT\n";
50 throw error() <<
"Unable to handle SIGQUIT\n";
57 if( signal(SIGPIPE, SIG_IGN) == SIG_ERR )
59 throw error() <<
"Unable to ignore SIGPIPE\n";
110 std::this_thread::sleep_for( std::chrono::seconds(1) );
122 LPROG( slog,
"\n\nHello! Your signal is being handled by signal_handler.\n" 123 <<
"Have a nice day!\n" );
static bool f_handling_sig_int
LOGGER(mtlog, "authentication")
static bool f_got_exit_signal
Contains the logger class and macros, based on Kasper's KLogger class.
static std::mutex f_mutex
static void print_message()
static bool got_exit_signal()
static void handler_cancel_threads(int _ignored)
static bool f_handling_sig_quit
static cancelers f_cancelers
void add_cancelable(cancelable *a_cancelable)
void remove_cancelable(cancelable *a_cancelable)
virtual ~signal_handler()
std::set< cancelable *> cancelers