- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
48
sig_die.c
48
sig_die.c
@ -8,45 +8,43 @@
|
||||
#endif
|
||||
|
||||
#ifdef KR_headers
|
||||
void sig_die(s, kill) register char *s; int kill;
|
||||
void sig_die(s, kill)
|
||||
register char *s;
|
||||
int kill;
|
||||
#else
|
||||
#include "stdlib.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
void f_exit(void){
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void sig_die(register char *s, int kill)
|
||||
void f_exit(void) {
|
||||
exit(0);
|
||||
} void sig_die(register char *s, int kill)
|
||||
#endif
|
||||
{
|
||||
/* print error message, then clear buffers */
|
||||
fprintf(stderr, "%s\n", s);
|
||||
{
|
||||
/* print error message, then clear buffers */
|
||||
fprintf(stderr, "%s\n", s);
|
||||
|
||||
if(kill)
|
||||
{
|
||||
fflush(stderr);
|
||||
f_exit();
|
||||
fflush(stderr);
|
||||
/* now get a core */
|
||||
if (kill) {
|
||||
fflush(stderr);
|
||||
f_exit();
|
||||
fflush(stderr);
|
||||
/* now get a core */
|
||||
#ifdef SIGIOT
|
||||
signal(SIGIOT, SIG_DFL);
|
||||
signal(SIGIOT, SIG_DFL);
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
else {
|
||||
abort();
|
||||
} else {
|
||||
#ifdef NO_ONEXIT
|
||||
f_exit();
|
||||
f_exit();
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user