#include <unistd.h>
#include <signal.h>
#include <sys/times.h>
#include <cassert>
#include <cstring>
#include <cerrno>
#include "scheduler.hh"
#include "utl/mark.hh"
#include "utl/log.hh"
Go to the source code of this file.
Namespaces | |
namespace | olsr |
namespace | olsr::sch |
namespace | olsr::sch::internal |
Defines | |
#define | QOLYESTER_SCH_SCHEDULER_HXX 1 |
#define | GET_OLD_HANDLER(Signal, SmallSignal) |
#define | PUT_NEW_HANDLER(Signal, SmallSignal) |
Functions | |
void | install_sighandlers () |
Variables | |
void(* | old_term_handler )(int) = SIG_IGN |
void(* | old_int_handler )(int) = SIG_IGN |
void(* | old_quit_handler )(int) = SIG_IGN |
|
Value: do { \ struct sigaction sa; \ int ret; \ while ((ret = ::sigaction(Signal, NULL, &sa)) < 0 && \ errno == EINTR); \ assert(ret == 0); \ old_ ## SmallSignal ## _handler = sa.sa_handler; \ } while (0) |
|
Value: do { \ if (old_ ## SmallSignal ## _handler != SIG_IGN) { \ struct sigaction sa; \ memset(&sa, 0, sizeof sa); \ sa.sa_handler = SmallSignal ## _handler; \ sigemptyset(&sa.sa_mask); \ sa.sa_flags = SA_RESTART; \ int ret; \ while ((ret = ::sigaction(Signal, &sa, NULL)) < 0 && \ errno == EINTR); \ assert(ret == 0); \ } \ } while (0) |
|
|
|
|
|
|
|
|
|
|