39 SG_PRINT(
"error uninitalizing signal handler\n")
46 SG_SPRINT(
"\nImmediately return to prompt / Prematurely finish computations / Do nothing (I/P/D)? ")
47 char answer=fgetc(stdin);
56 else if (answer ==
'P')
61 else if (signal == SIGURG)
64 SG_SPRINT(
"unknown signal %d received\n", signal)
79 act.sa_sigaction=NULL;
90 for (int32_t j=i-1; j>=0; j--)
static bool set_handler()
void(* sg_print_error)(FILE *target, const char *str)
function called to print error messages
Class SGObject is the base class of all shogun objects.
static bool cancel_computation
static void clear_cancel()
static bool unset_handler()
static void handler(int signal)
static int signals[NUMTRAPPEDSIGS]
all of classes and functions are contained in the shogun namespace
Class Signal implements signal handling to e.g. allow ctrl+c to cancel a long running process...
static struct sigaction oldsigaction[NUMTRAPPEDSIGS]
static void set_cancel(bool immediately=false)
static bool cancel_immediately