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:
parent
6709931d51
commit
f55860670a
3 changed files with 24 additions and 24 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue