blob: 4d301f94dc1cae4fb93818f1df623c66827df3b6 [file] [log] [blame]
Igor Sysoev3c3ca172004-01-05 20:55:48 +00001#ifndef _NGX_CYCLE_H_INCLUDED_
2#define _NGX_CYCLE_H_INCLUDED_
3
4
5#include <ngx_config.h>
6#include <ngx_core.h>
7
8
9struct ngx_cycle_s {
10 void ****conf_ctx;
11 ngx_pool_t *pool;
12 ngx_log_t *log;
13 ngx_array_t listening;
14 ngx_array_t open_files;
15 ngx_array_t pathes;
16
17 int connection_n;
18 ngx_connection_t *connections;
19 ngx_event_t *read_events;
20 ngx_event_t *write_events;
21
22 ngx_cycle_t *old_cycle;
23
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000024 ngx_str_t conf_file;
Igor Sysoev3c3ca172004-01-05 20:55:48 +000025};
26
27
Igor Sysoeva5362982004-03-04 07:04:55 +000028typedef struct {
29 ngx_flag_t daemon;
30 ngx_flag_t master;
31 ngx_flag_t worker_reopen;
32 ngx_uid_t user;
33 ngx_gid_t group;
34 ngx_str_t pid;
35 ngx_str_t newpid;
36} ngx_core_conf_t;
37
38
Igor Sysoev3c3ca172004-01-05 20:55:48 +000039ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle);
Igor Sysoeva5362982004-03-04 07:04:55 +000040void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user);
41ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
Igor Sysoev3c3ca172004-01-05 20:55:48 +000042
43
44extern volatile ngx_cycle_t *ngx_cycle;
45extern ngx_array_t ngx_old_cycles;
Igor Sysoeva5362982004-03-04 07:04:55 +000046extern ngx_module_t ngx_core_module;
Igor Sysoev3c3ca172004-01-05 20:55:48 +000047
48
49#endif /* _NGX_CYCLE_H_INCLUDED_ */