summaryrefslogtreecommitdiffstats
path: root/src/main.h
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2016-09-05 08:27:26 +0000
committerLennart Weller <lhw@ring0.de>2016-09-05 08:27:26 +0000
commit58d9525d7fcacffe52eff7282b7a888dd0dcc1d0 (patch)
tree251a805eb38d4d75b2a7f44c2cc22e7ea4849513 /src/main.h
parentFixes for service startup and extra config files (diff)
parentImported Upstream version 1.3.0+dfsg (diff)
downloadnetdata-58d9525d7fcacffe52eff7282b7a888dd0dcc1d0.tar.xz
netdata-58d9525d7fcacffe52eff7282b7a888dd0dcc1d0.zip
Merge tag 'upstream/1.3.0+dfsg'
Upstream version 1.3.0+dfsg
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/main.h b/src/main.h
index d9edda58..646827fb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,12 +1,31 @@
#ifndef NETDATA_MAIN_H
#define NETDATA_MAIN_H 1
-#include <signal.h>
-
extern volatile sig_atomic_t netdata_exit;
+/**
+ * This struct contains information about command line options.
+ */
+struct option_def {
+ /** The option character */
+ const char val;
+ /** The name of the long option. */
+ const char *description;
+ /** Short descripton what the option does */
+ /** Name of the argument displayed in SYNOPSIS */
+ const char *arg_name;
+ /** Default value if not set */
+ const char *default_value;
+};
+
+/**
+ * List of command line options.
+ * This can be used to compute manpage, help messages, ect.
+ */
+extern struct option_def options[];
+
extern void kill_childs(void);
extern int killpid(pid_t pid, int signal);
-extern void netdata_cleanup_and_exit(int ret);
+extern void netdata_cleanup_and_exit(int ret) __attribute__ ((noreturn));
#endif /* NETDATA_MAIN_H */