Loading...
Searching...
No Matches
cntrlc.h
Go to the documentation of this file.
#ifndef CNTRLC_H
#define CNTRLC_H
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
/*
* ABSTRACT - interrupt and signal handling
*/
#include <setjmp.h>
#include "kernel/mod2.h"
#include "kernel/structs.h"
EXTERN_VAR jmp_buf si_start_jmpbuf;
EXTERN_VAR short si_restart;
EXTERN_VAR int siRandomStart;
void init_signals(void);
EXTERN_VAR BOOLEAN singular_in_batchmode;
/* TRUE for child of a fork or started with --batch*/
/* for deferring the call of m2_end() in SIGTERM handler if necessary */
EXTERN_VAR volatile BOOLEAN do_shutdown;
EXTERN_VAR volatile int defer_shutdown;
void si_set_signals();
void si_reset_signals();
void sig_term_hdl_child(int /*sig*/);
void sig_term_hdl(int /*sig*/);
typedef void (*si_hdl_typ)(int);
si_hdl_typ si_set_signal ( int sig, si_hdl_typ signal_handler);
#endif
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
si_start_jmpbuf
VAR jmp_buf si_start_jmpbuf
Definition cntrlc.cc:98
singular_in_batchmode
VAR BOOLEAN singular_in_batchmode
Definition cntrlc.cc:62
do_shutdown
VAR volatile BOOLEAN do_shutdown
Definition cntrlc.cc:74
si_restart
VAR short si_restart
Definition cntrlc.cc:100
defer_shutdown
VAR volatile int defer_shutdown
Definition cntrlc.cc:75
siRandomStart
VAR int siRandomStart
Definition cntrlc.cc:99
init_signals
void init_signals(void)
init signal handlers and error handling for libraries: NTL, factory
Definition cntrlc.cc:530
si_set_signals
void si_set_signals()
Definition cntrlc.cc:560
si_set_signal
si_hdl_typ si_set_signal(int sig, si_hdl_typ signal_handler)
meta function for binding a signal to an handler
Definition cntrlc.cc:121
sig_term_hdl_child
void sig_term_hdl_child(int)
Definition cntrlc.cc:86
si_reset_signals
void si_reset_signals()
Definition cntrlc.cc:568
sig_term_hdl
void sig_term_hdl(int)
Definition cntrlc.cc:77
si_hdl_typ
void(* si_hdl_typ)(int)
Definition cntrlc.h:30
EXTERN_VAR
#define EXTERN_VAR
Definition globaldefs.h:6
mod2.h
structs.h