summaryrefslogtreecommitdiff
path: root/src/common/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/core.h')
-rw-r--r--src/common/core.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/core.h b/src/common/core.h
index fc4af3e3e..beb72d080 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -7,6 +7,7 @@
extern int arg_c;
extern char **arg_v;
+/// @see E_CORE_ST
extern int runflag;
extern char *SERVER_NAME;
extern char SERVER_TYPE;
@@ -18,4 +19,16 @@ extern void set_server_type(void);
extern void do_abort(void);
extern void do_final(void);
+/// The main loop continues until runflag is CORE_ST_STOP
+enum E_CORE_ST
+{
+ CORE_ST_STOP = 0,
+ CORE_ST_RUN,
+ CORE_ST_LAST
+};
+
+/// Called when a terminate signal is received. (Ctrl+C pressed)
+/// If NULL, runflag is set to CORE_ST_STOP instead.
+extern void (*shutdown_callback)(void);
+
#endif /* _CORE_H_ */