]> arthur.barton.de Git - netdata.git/blob - src/main.h
Command line: Follow IEEE Std 1003.1, 2013 Edition
[netdata.git] / src / main.h
1 #include <getopt.h>
2
3 #ifndef NETDATA_MAIN_H
4 #define NETDATA_MAIN_H 1
5
6 #include <signal.h>
7
8 extern volatile sig_atomic_t netdata_exit;
9
10 /**
11  * This struct contains information about command line options.
12  */
13 struct option_def {
14         /** The option character */
15         const char val;
16         /** The name of the long option. */
17         const char *description;
18         /** Short descripton what the option does */
19         /** Name of the argument displayed in SYNOPSIS */
20         const char *arg_name;
21         /** Default value if not set */
22         const char *default_value;
23 };
24
25 /**
26  * List of command line options.
27  * This can be used to compute manpage, help messages, ect.
28  */
29 extern struct option_def options[];
30
31 extern void kill_childs(void);
32 extern int killpid(pid_t pid, int signal);
33 extern void netdata_cleanup_and_exit(int ret);
34
35 #endif /* NETDATA_MAIN_H */