|
|
1.1 ! root 1: #include "stdio.h" ! 2: #include "signal.h" ! 3: ! 4: #ifndef SIGIOT ! 5: #define SIGIOT SIGABRT ! 6: #endif ! 7: ! 8: #ifdef KR_headers ! 9: void sig_die(s, kill) register char *s; int kill; ! 10: #else ! 11: #include "stdlib.h" ! 12: #ifdef __cplusplus ! 13: extern "C" { ! 14: #endif ! 15: extern void f_exit(void); ! 16: ! 17: void sig_die(register char *s, int kill) ! 18: #endif ! 19: { ! 20: /* print error message, then clear buffers */ ! 21: fprintf(stderr, "%s\n", s); ! 22: fflush(stderr); ! 23: f_exit(); ! 24: fflush(stderr); ! 25: ! 26: if(kill) ! 27: { ! 28: /* now get a core */ ! 29: signal(SIGIOT, SIG_DFL); ! 30: abort(); ! 31: } ! 32: else ! 33: exit(1); ! 34: } ! 35: #ifdef __cplusplus ! 36: } ! 37: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.