blob: df1f3903326cbaab883955cb0c7d51b09a7dd776 [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
Igor Sysoev10a543a2004-03-16 07:10:12 +000017 ngx_uint_t connection_n;
Igor Sysoev3c3ca172004-01-05 20:55:48 +000018 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;
Igor Sysoeva741f8d2004-03-30 20:31:58 +000031
32 ngx_int_t worker_processes;
33
Igor Sysoeva5362982004-03-04 07:04:55 +000034 ngx_uid_t user;
35 ngx_gid_t group;
Igor Sysoeva741f8d2004-03-30 20:31:58 +000036
Igor Sysoeva5362982004-03-04 07:04:55 +000037 ngx_str_t pid;
38 ngx_str_t newpid;
39} ngx_core_conf_t;
40
41
Igor Sysoev3c3ca172004-01-05 20:55:48 +000042ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle);
Igor Sysoeva5362982004-03-04 07:04:55 +000043void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user);
44ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
Igor Sysoev3c3ca172004-01-05 20:55:48 +000045
46
47extern volatile ngx_cycle_t *ngx_cycle;
48extern ngx_array_t ngx_old_cycles;
Igor Sysoeva5362982004-03-04 07:04:55 +000049extern ngx_module_t ngx_core_module;
Igor Sysoev3c3ca172004-01-05 20:55:48 +000050
51
52#endif /* _NGX_CYCLE_H_INCLUDED_ */