]> arthur.barton.de Git - netdata.git/blob - src/main.h
Merge pull request #1597 from l2isbad/some_minor_fixes
[netdata.git] / src / main.h
1 #ifndef NETDATA_MAIN_H
2 #define NETDATA_MAIN_H 1
3
4 extern volatile sig_atomic_t netdata_exit;
5
6 /**
7  * This struct contains information about command line options.
8  */
9 struct option_def {
10     /** The option character */
11     const char val;
12     /** The name of the long option. */
13     const char *description;
14     /** Short descripton what the option does */
15     /** Name of the argument displayed in SYNOPSIS */
16     const char *arg_name;
17     /** Default value if not set */
18     const char *default_value;
19 };
20
21 /**
22  * List of command line options.
23  * This can be used to compute manpage, help messages, ect.
24  */
25 extern struct option_def options[];
26
27
28 struct netdata_static_thread {
29     char *name;
30
31     char *config_section;
32     char *config_name;
33
34     volatile int enabled;
35
36     pthread_t *thread;
37
38     void (*init_routine) (void);
39     void *(*start_routine) (void *);
40 };
41
42 extern void kill_childs(void);
43 extern int killpid(pid_t pid, int signal);
44 extern void netdata_cleanup_and_exit(int ret) NORETURN;
45
46 #endif /* NETDATA_MAIN_H */