30#if defined(__OPTIMIZE__) && defined(CALL_GDB)
34 #ifdef TIME_WITH_SYS_TIME
36 #ifdef HAVE_SYS_TIME_H
40 #ifdef HAVE_SYS_TIME_H
46 #ifdef HAVE_SYS_TIMES_H
47 #include <sys/times.h>
54 static void debug (
int);
124 fprintf(
stderr,
"Unable to init signal %d ... exiting...\n", sig);
145 fprintf(
stderr,
"Unable to init signal %d ... exiting...\n", sig);
154#if defined(__linux__) && (defined(__i386) || defined(__amd64))
169 fprintf(
stderr,
"Segment fault/Bus error occurred at %lx because of %lx (r:%d)\n"
170 "please inform the authors\n",
209 fprintf(
stderr,
"Segment fault/Bus error occurred at %x (r:%d)\n"
210 "please inform the authors\n",
242 "please inform the authors\n",
295 fputs(
"abort after this command(a), abort immediately(r), print backtrace(b), continue(c) or quit Singular(q) ?",
stderr);
313 fputs(
"** Warning: Singular should be restarted as soon as possible **\n",
stderr);
322 fputs(
"** tried too often, try another possibility **\n",
stderr);
383 char * args[4] = { (
char*)
"gdb", (
char*)
"Singular",
NULL,
NULL };
399 fputs (
"\n\nquit with \"p si_stop_stack_trace_x=0\"\n\n\n",
stderr);
413 perror (
"could not fork");
443 perror (
"could open pipe");
460 perror (
"could not fork");
500 if ((c ==
'\n') || (c ==
'\r'))
VAR jmp_buf si_start_jmpbuf
static void stack_trace(char *const *args)
VAR BOOLEAN singular_in_batchmode
si_hdl_typ si_set_signal(int sig, si_hdl_typ signal_handler)
meta function for binding a signal to an handler
VAR volatile int si_stop_stack_trace_x
VAR volatile BOOLEAN do_shutdown
VAR volatile int defer_shutdown
VAR int sigint_handler_cnt
void sigsegv_handler(int sig)
static void debug_stop(char *const *args)
void init_signals()
init signal handlers and error handling for libraries: NTL, factory
const CanonicalForm int s
void WerrorS(const char *s)
static void * feOptValue(feOptIndex opt)
EXTERN_VAR struct fe_option feOptSpec[]
VAR char my_yylinebuf[80]
VAR BOOLEAN fe_is_raw_tty
Voice * feInitStdin(Voice *pp)
const char * Tok2Cmdname(int tok)
This file provides miscellaneous functionality.
int dReportError(const char *fmt,...)
static int index(p_Length length, p_Ord ord)
#define si_siginterrupt(arg1, arg2)
int status int void * buf
BOOLEAN slClose(si_link l)
void sig_chld_hdl(int)
additional default signal handler