Move oops actions from log.c up to application

Change oops() to call the new oops_handler function pointer instead of
offering a fixed set of actions.  Change server's main() to install a
handler for the action requested by -E.
This commit is contained in:
Markus Armbruster 2008-04-25 20:20:07 +02:00
parent 6709931d51
commit f55860670a
3 changed files with 24 additions and 24 deletions

View file

@ -69,13 +69,6 @@
#define hours(x) (60*60*(x))
#define days(x) (60*60*24*(x))
enum oops_action {
OOPS_ABORT,
OOPS_CRASH_DUMP,
OOPS_NOTHING
};
extern enum oops_action oops_action;
/*
* If EXPR is true, an internal error occured.
* Return EXPR != 0.
@ -90,6 +83,7 @@ extern enum oops_action oops_action;
#define CANT_REACH() (void)oops(NULL, __FILE__, __LINE__)
extern int oops(char *, char *, int);
extern void (*oops_handler)(void);
void exit_nomem(void) ATTRIBUTE((noreturn));