annotate src/core/ngx_cycle.h @ 22:8b6db3bda591 NGINX_0_1_11

nginx 0.1.11 *) Feature: the worker_priority directive. *) Change: both tcp_nopush and tcp_nodelay directives affect the transferred response. *) Bugfix: nginx did not call initgroups(). Thanks to Andrew Sitnikov and Andrei Nigmatulin. *) Change: now the ngx_http_autoindex_module shows the file size in the bytes. *) Bugfix: the ngx_http_autoindex_module returned the 500 error if the broken symlink was in a directory. *) Bugfix: the files bigger than 4G could not be transferred using sendfile. *) Bugfix: if the backend was resolved to several backends and there was an error while the response waiting then process may got caught in an endless loop. *) Bugfix: the worker process may exit with the "unknown cycle" message when the /dev/poll method was used. *) Bugfix: "close() channel failed" errors. *) Bugfix: the autodetection of the "nobody" and "nogroup" groups. *) Bugfix: the send_lowat directive did not work on Linux. *) Bugfix: the segmentation fault occurred if there was no events section in configuration. *) Bugfix: nginx could not be built on OpenBSD. *) Bugfix: the double slashes in "://" in the URI were converted to ":/".
author Igor Sysoev <http://sysoev.ru>
date Thu, 02 Dec 2004 00:00:00 +0300
parents 46833bd150cb
children 3050baa54a26
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
4 */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_CYCLE_H_INCLUDED_
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #define _NGX_CYCLE_H_INCLUDED_
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11 #include <ngx_config.h>
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_core.h>
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14
10
46833bd150cb nginx 0.1.5
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
15 #define NGX_DEBUG_POINTS_STOP 1
46833bd150cb nginx 0.1.5
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
16 #define NGX_DEBUG_POINTS_ABORT 2
46833bd150cb nginx 0.1.5
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
17
46833bd150cb nginx 0.1.5
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
18
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19 struct ngx_cycle_s {
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
20 void ****conf_ctx;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
21 ngx_pool_t *pool;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
23 ngx_log_t *log;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
24 ngx_log_t *new_log;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
25
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
26 ngx_array_t listening;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
27 ngx_array_t pathes;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
28 ngx_list_t open_files;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
30 ngx_uint_t connection_n;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
31 ngx_connection_t *connections;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
32 ngx_event_t *read_events;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
33 ngx_event_t *write_events;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
35 ngx_cycle_t *old_cycle;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
37 ngx_str_t conf_file;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
38 ngx_str_t root;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39 };
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42 typedef struct {
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
43 ngx_flag_t daemon;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
44 ngx_flag_t master;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
46 ngx_int_t worker_processes;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
47 ngx_int_t debug_points;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
49 int priority;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
50
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
51 char *username;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
52 ngx_uid_t user;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
53 ngx_gid_t group;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
54
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
55 ngx_str_t pid;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
56 ngx_str_t newpid;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
57
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
58 #if (NGX_THREADS)
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
59 ngx_int_t worker_threads;
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
60 size_t thread_stack_size;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
61 #endif
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
62
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
63 } ngx_core_conf_t;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
64
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
65
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66 typedef struct {
22
8b6db3bda591 nginx 0.1.11
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
67 ngx_pool_t *pool; /* pcre's malloc() pool */
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
68 } ngx_core_tls_t;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
69
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
70
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71 ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
72 ngx_int_t ngx_create_pidfile(ngx_cycle_t *cycle, ngx_cycle_t *old_cycle);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
73 void ngx_delete_pidfile(ngx_cycle_t *cycle);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
74 void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
75 ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
76
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
77
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
78 extern volatile ngx_cycle_t *ngx_cycle;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
79 extern ngx_array_t ngx_old_cycles;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
80 extern ngx_module_t ngx_core_module;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
81 extern ngx_uint_t ngx_test_config;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
82 #if (NGX_THREADS)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
83 extern ngx_tls_key_t ngx_core_tls_key;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
84 #endif
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
85
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
86
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
87 #endif /* _NGX_CYCLE_H_INCLUDED_ */