Mercurial > hg > nginx
annotate src/event/modules/ngx_rtsig_module.c @ 5504:8ed467553f6b
SSL: fixed ssl_verify_depth to take only one argument.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 14 Jan 2014 15:56:40 +0400 |
parents | 4c36e15651f7 |
children | 3377f9459e99 |
rev | line source |
---|---|
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
1 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
4412 | 4 * Copyright (C) Nginx, Inc. |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
5 */ |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
6 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
7 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
8 #include <ngx_config.h> |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
9 #include <ngx_core.h> |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
10 #include <ngx_event.h> |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
11 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
12 |
469 | 13 #if (NGX_TEST_BUILD_RTSIG) |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
14 |
4759
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
15 #if (NGX_DARWIN) |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
16 |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
17 #define SIGRTMIN 33 |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
18 #define si_fd __pad[0] |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
19 |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
20 #else |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
21 |
1939
6e7daf852eec
restore building --test-build-rtsig and --test-build-eventport on FreeBSD 6
Igor Sysoev <igor@sysoev.ru>
parents:
1870
diff
changeset
|
22 #ifdef SIGRTMIN |
6e7daf852eec
restore building --test-build-rtsig and --test-build-eventport on FreeBSD 6
Igor Sysoev <igor@sysoev.ru>
parents:
1870
diff
changeset
|
23 #define si_fd _reason.__spare__.__spare2__[0] |
6e7daf852eec
restore building --test-build-rtsig and --test-build-eventport on FreeBSD 6
Igor Sysoev <igor@sysoev.ru>
parents:
1870
diff
changeset
|
24 #else |
6e7daf852eec
restore building --test-build-rtsig and --test-build-eventport on FreeBSD 6
Igor Sysoev <igor@sysoev.ru>
parents:
1870
diff
changeset
|
25 #define SIGRTMIN 33 |
6e7daf852eec
restore building --test-build-rtsig and --test-build-eventport on FreeBSD 6
Igor Sysoev <igor@sysoev.ru>
parents:
1870
diff
changeset
|
26 #define si_fd __spare__[0] |
6e7daf852eec
restore building --test-build-rtsig and --test-build-eventport on FreeBSD 6
Igor Sysoev <igor@sysoev.ru>
parents:
1870
diff
changeset
|
27 #endif |
6e7daf852eec
restore building --test-build-rtsig and --test-build-eventport on FreeBSD 6
Igor Sysoev <igor@sysoev.ru>
parents:
1870
diff
changeset
|
28 |
4759
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
29 #endif |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
30 |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
31 #define F_SETSIG 10 |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
32 #define KERN_RTSIGNR 30 |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
33 #define KERN_RTSIGMAX 31 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
34 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
35 int sigtimedwait(const sigset_t *set, siginfo_t *info, |
4759
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
36 const struct timespec *timeout); |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
37 |
4c36e15651f7
Fixed compilation with -Wmissing-prototypes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
38 int sigtimedwait(const sigset_t *set, siginfo_t *info, |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
39 const struct timespec *timeout) |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
40 { |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
41 return -1; |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
42 } |
247
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
43 |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
44 int ngx_linux_rtsig_max; |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
45 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
46 #endif |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
47 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
48 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
49 typedef struct { |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
50 ngx_uint_t signo; |
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
51 ngx_uint_t overflow_events; |
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
52 ngx_uint_t overflow_test; |
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
53 ngx_uint_t overflow_threshold; |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
54 } ngx_rtsig_conf_t; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
55 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
56 |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
57 extern ngx_event_module_t ngx_poll_module_ctx; |
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
58 |
563 | 59 static ngx_int_t ngx_rtsig_init(ngx_cycle_t *cycle, ngx_msec_t timer); |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
60 static void ngx_rtsig_done(ngx_cycle_t *cycle); |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
61 static ngx_int_t ngx_rtsig_add_connection(ngx_connection_t *c); |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
62 static ngx_int_t ngx_rtsig_del_connection(ngx_connection_t *c, |
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
63 ngx_uint_t flags); |
563 | 64 static ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle, |
65 ngx_msec_t timer, ngx_uint_t flags); | |
66 static ngx_int_t ngx_rtsig_process_overflow(ngx_cycle_t *cycle, | |
67 ngx_msec_t timer, ngx_uint_t flags); | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
68 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
69 static void *ngx_rtsig_create_conf(ngx_cycle_t *cycle); |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
70 static char *ngx_rtsig_init_conf(ngx_cycle_t *cycle, void *conf); |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
71 static char *ngx_check_ngx_overflow_threshold_bounds(ngx_conf_t *cf, |
499 | 72 void *post, void *data); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
73 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
74 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
75 static sigset_t set; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
76 static ngx_uint_t overflow, overflow_current; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
77 static struct pollfd *overflow_list; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
78 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
79 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
80 static ngx_str_t rtsig_name = ngx_string("rtsig"); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
81 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
82 static ngx_conf_num_bounds_t ngx_overflow_threshold_bounds = { |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
83 ngx_check_ngx_overflow_threshold_bounds, 2, 10 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
84 }; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
85 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
86 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
87 static ngx_command_t ngx_rtsig_commands[] = { |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
88 |
499 | 89 { ngx_string("rtsig_signo"), |
90 NGX_EVENT_CONF|NGX_CONF_TAKE1, | |
91 ngx_conf_set_num_slot, | |
92 0, | |
93 offsetof(ngx_rtsig_conf_t, signo), | |
94 NULL }, | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
95 |
499 | 96 { ngx_string("rtsig_overflow_events"), |
97 NGX_EVENT_CONF|NGX_CONF_TAKE1, | |
98 ngx_conf_set_num_slot, | |
99 0, | |
100 offsetof(ngx_rtsig_conf_t, overflow_events), | |
101 NULL }, | |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
102 |
499 | 103 { ngx_string("rtsig_overflow_test"), |
104 NGX_EVENT_CONF|NGX_CONF_TAKE1, | |
105 ngx_conf_set_num_slot, | |
106 0, | |
107 offsetof(ngx_rtsig_conf_t, overflow_test), | |
108 NULL }, | |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
109 |
499 | 110 { ngx_string("rtsig_overflow_threshold"), |
111 NGX_EVENT_CONF|NGX_CONF_TAKE1, | |
112 ngx_conf_set_num_slot, | |
113 0, | |
114 offsetof(ngx_rtsig_conf_t, overflow_threshold), | |
115 &ngx_overflow_threshold_bounds }, | |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
116 |
499 | 117 ngx_null_command |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
118 }; |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
119 |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
120 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
121 ngx_event_module_t ngx_rtsig_module_ctx = { |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
122 &rtsig_name, |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
123 ngx_rtsig_create_conf, /* create configuration */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
124 ngx_rtsig_init_conf, /* init configuration */ |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
125 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
126 { |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
127 NULL, /* add an event */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
128 NULL, /* delete an event */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
129 NULL, /* enable an event */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
130 NULL, /* disable an event */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
131 ngx_rtsig_add_connection, /* add an connection */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
132 ngx_rtsig_del_connection, /* delete an connection */ |
380
5ce6561246a5
nginx-0.0.7-2004-07-07-10:15:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
375
diff
changeset
|
133 NULL, /* process the changes */ |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
134 ngx_rtsig_process_events, /* process the events */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
135 ngx_rtsig_init, /* init the events */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
136 ngx_rtsig_done, /* done the events */ |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
137 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
138 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
139 }; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
140 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
141 ngx_module_t ngx_rtsig_module = { |
509 | 142 NGX_MODULE_V1, |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
143 &ngx_rtsig_module_ctx, /* module context */ |
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
144 ngx_rtsig_commands, /* module directives */ |
499 | 145 NGX_EVENT_MODULE, /* module type */ |
541 | 146 NULL, /* init master */ |
499 | 147 NULL, /* init module */ |
541 | 148 NULL, /* init process */ |
149 NULL, /* init thread */ | |
150 NULL, /* exit thread */ | |
151 NULL, /* exit process */ | |
152 NULL, /* exit master */ | |
153 NGX_MODULE_V1_PADDING | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
154 }; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
155 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
156 |
499 | 157 static ngx_int_t |
563 | 158 ngx_rtsig_init(ngx_cycle_t *cycle, ngx_msec_t timer) |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
159 { |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
160 ngx_rtsig_conf_t *rtscf; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
161 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
162 rtscf = ngx_event_get_conf(cycle->conf_ctx, ngx_rtsig_module); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
163 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
164 sigemptyset(&set); |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
165 sigaddset(&set, (int) rtscf->signo); |
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
166 sigaddset(&set, (int) rtscf->signo + 1); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
167 sigaddset(&set, SIGIO); |
563 | 168 sigaddset(&set, SIGALRM); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
169 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
170 if (sigprocmask(SIG_BLOCK, &set, NULL) == -1) { |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
171 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
172 "sigprocmask() failed"); |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
173 return NGX_ERROR; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
174 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
175 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
176 if (overflow_list) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
177 ngx_free(overflow_list); |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
178 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
179 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
180 overflow_list = ngx_alloc(sizeof(struct pollfd) * rtscf->overflow_events, |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
181 cycle->log); |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
182 if (overflow_list == NULL) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
183 return NGX_ERROR; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
184 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
185 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
186 ngx_io = ngx_os_io; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
187 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
188 ngx_event_actions = ngx_rtsig_module_ctx.actions; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
189 |
543 | 190 ngx_event_flags = NGX_USE_RTSIG_EVENT |
191 |NGX_USE_GREEDY_EVENT | |
192 |NGX_USE_FD_EVENT; | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
193 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
194 return NGX_OK; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
195 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
196 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
197 |
499 | 198 static void |
199 ngx_rtsig_done(ngx_cycle_t *cycle) | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
200 { |
452 | 201 ngx_free(overflow_list); |
202 | |
203 overflow_list = NULL; | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
204 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
205 |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
206 |
499 | 207 static ngx_int_t |
208 ngx_rtsig_add_connection(ngx_connection_t *c) | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
209 { |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
210 ngx_uint_t signo; |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
211 ngx_rtsig_conf_t *rtscf; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
212 |
349
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
213 if (c->read->accept && c->read->disabled) { |
354
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
214 |
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
215 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, |
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
216 "rtsig enable connection: fd:%d", c->fd); |
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
217 |
349
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
218 if (fcntl(c->fd, F_SETOWN, ngx_pid) == -1) { |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
219 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
220 "fcntl(F_SETOWN) failed"); |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
221 return NGX_ERROR; |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
222 } |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
223 |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
224 c->read->active = 1; |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
225 c->read->disabled = 0; |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
226 } |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
227 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
228 rtscf = ngx_event_get_conf(ngx_cycle->conf_ctx, ngx_rtsig_module); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
229 |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
230 signo = rtscf->signo + c->read->instance; |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
231 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
232 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
233 "rtsig add connection: fd:%d signo:%ui", c->fd, signo); |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
234 |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
235 if (fcntl(c->fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC) == -1) { |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
236 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
237 "fcntl(O_RDWR|O_NONBLOCK|O_ASYNC) failed"); |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
238 return NGX_ERROR; |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
239 } |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
240 |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
241 if (fcntl(c->fd, F_SETSIG, (int) signo) == -1) { |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
242 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
243 "fcntl(F_SETSIG) failed"); |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
244 return NGX_ERROR; |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
245 } |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
246 |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
247 if (fcntl(c->fd, F_SETOWN, ngx_pid) == -1) { |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
248 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
249 "fcntl(F_SETOWN) failed"); |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
250 return NGX_ERROR; |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
251 } |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
252 |
469 | 253 #if (NGX_HAVE_ONESIGFD) |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
254 if (fcntl(c->fd, F_SETAUXFL, O_ONESIGFD) == -1) { |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
255 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
256 "fcntl(F_SETAUXFL) failed"); |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
257 return NGX_ERROR; |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
258 } |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
259 #endif |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
260 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
261 c->read->active = 1; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
262 c->write->active = 1; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
263 |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
264 return NGX_OK; |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
265 } |
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
266 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
267 |
499 | 268 static ngx_int_t |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
269 ngx_rtsig_del_connection(ngx_connection_t *c, ngx_uint_t flags) |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
270 { |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
271 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
272 "rtsig del connection: fd:%d", c->fd); |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
273 |
349
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
274 if ((flags & NGX_DISABLE_EVENT) && c->read->accept) { |
354
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
275 |
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
276 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, |
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
277 "rtsig disable connection: fd:%d", c->fd); |
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
278 |
349
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
279 c->read->active = 0; |
354
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
280 c->read->disabled = 1; |
349
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
281 return NGX_OK; |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
282 } |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
283 |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
284 if (flags & NGX_CLOSE_EVENT) { |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
285 c->read->active = 0; |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
286 c->write->active = 0; |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
287 return NGX_OK; |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
288 } |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
289 |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
290 if (fcntl(c->fd, F_SETFL, O_RDWR|O_NONBLOCK) == -1) { |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
291 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
292 "fcntl(O_RDWR|O_NONBLOCK) failed"); |
a958aa92f9a5
nginx-0.0.4-2004-06-09-20:36:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
348
diff
changeset
|
293 return NGX_ERROR; |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
294 } |
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
295 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
296 c->read->active = 0; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
297 c->write->active = 0; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
298 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
299 return NGX_OK; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
300 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
301 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
302 |
499 | 303 static ngx_int_t |
563 | 304 ngx_rtsig_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags) |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
305 { |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
306 int signo; |
501 | 307 ngx_int_t instance; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
308 ngx_err_t err; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
309 siginfo_t si; |
573 | 310 ngx_event_t *rev, *wev, **queue; |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
311 struct timespec ts, *tp; |
247
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
312 struct sigaction sa; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
313 ngx_connection_t *c; |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
314 ngx_rtsig_conf_t *rtscf; |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
315 |
316
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
316 if (timer == NGX_TIMER_INFINITE) { |
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
317 tp = NULL; |
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
318 |
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
319 } else { |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
320 ts.tv_sec = timer / 1000; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
321 ts.tv_nsec = (timer % 1000) * 1000000; |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
322 tp = &ts; |
316
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
323 } |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
324 |
305
4b1a3a4acc60
nginx-0.0.3-2004-04-02-19:13:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
262
diff
changeset
|
325 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
557 | 326 "rtsig timer: %M", timer); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
327 |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
328 /* Linux's sigwaitinfo() is sigtimedwait() with the NULL timeout pointer */ |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
329 |
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
330 signo = sigtimedwait(&set, &si, tp); |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
331 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
332 if (signo == -1) { |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
333 err = ngx_errno; |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
334 |
382
449c4885dcd1
nginx-0.0.7-2004-07-07-23:48:31 import
Igor Sysoev <igor@sysoev.ru>
parents:
381
diff
changeset
|
335 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, err, |
449c4885dcd1
nginx-0.0.7-2004-07-07-23:48:31 import
Igor Sysoev <igor@sysoev.ru>
parents:
381
diff
changeset
|
336 "rtsig signo:%d", signo); |
449c4885dcd1
nginx-0.0.7-2004-07-07-23:48:31 import
Igor Sysoev <igor@sysoev.ru>
parents:
381
diff
changeset
|
337 |
567 | 338 if (flags & NGX_UPDATE_TIME) { |
3475
ab353d7dc182
*) introduce ngx_time_sigsafe_update() to update the error log time only
Igor Sysoev <igor@sysoev.ru>
parents:
3474
diff
changeset
|
339 ngx_time_update(); |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
340 } |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
341 |
567 | 342 if (err == NGX_EAGAIN) { |
343 | |
344 /* timeout */ | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
345 |
567 | 346 if (timer != NGX_TIMER_INFINITE) { |
347 return NGX_AGAIN; | |
348 } | |
577 | 349 |
567 | 350 ngx_log_error(NGX_LOG_ALERT, cycle->log, err, |
351 "sigtimedwait() returned EAGAIN without timeout"); | |
352 return NGX_ERROR; | |
353 } | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
354 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
355 ngx_log_error((err == NGX_EINTR) ? NGX_LOG_INFO : NGX_LOG_ALERT, |
305
4b1a3a4acc60
nginx-0.0.3-2004-04-02-19:13:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
262
diff
changeset
|
356 cycle->log, err, "sigtimedwait() failed"); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
357 return NGX_ERROR; |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
358 } |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
359 |
567 | 360 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
361 "rtsig signo:%d fd:%d band:%04Xd", | |
362 signo, si.si_fd, si.si_band); | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
363 |
567 | 364 if (flags & NGX_UPDATE_TIME) { |
3475
ab353d7dc182
*) introduce ngx_time_sigsafe_update() to update the error log time only
Igor Sysoev <igor@sysoev.ru>
parents:
3474
diff
changeset
|
365 ngx_time_update(); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
366 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
367 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
368 rtscf = ngx_event_get_conf(ngx_cycle->conf_ctx, ngx_rtsig_module); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
369 |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
370 if (signo == (int) rtscf->signo || signo == (int) rtscf->signo + 1) { |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
371 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
372 if (overflow && (ngx_uint_t) si.si_fd > overflow_current) { |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
373 return NGX_OK; |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
374 } |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
375 |
551 | 376 c = ngx_cycle->files[si.si_fd]; |
377 | |
378 if (c == NULL) { | |
563 | 379 |
551 | 380 /* the stale event */ |
305
4b1a3a4acc60
nginx-0.0.3-2004-04-02-19:13:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
262
diff
changeset
|
381 |
551 | 382 return NGX_OK; |
383 } | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
384 |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
385 instance = signo - (int) rtscf->signo; |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
386 |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
387 rev = c->read; |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
388 |
563 | 389 if (rev->instance != instance) { |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
390 |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
391 /* |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
392 * the stale event from a file descriptor |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
393 * that was just closed in this iteration |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
394 */ |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
395 |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
396 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
461 | 397 "rtsig: stale event %p", c); |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
398 |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
399 return NGX_OK; |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
328
diff
changeset
|
400 } |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
401 |
563 | 402 if ((si.si_band & (POLLIN|POLLHUP|POLLERR)) && rev->active) { |
573 | 403 |
563 | 404 rev->ready = 1; |
573 | 405 |
406 if (flags & NGX_POST_EVENTS) { | |
407 queue = (ngx_event_t **) (rev->accept ? | |
408 &ngx_posted_accept_events : &ngx_posted_events); | |
409 | |
410 ngx_locked_post_event(rev, queue); | |
411 | |
577 | 412 } else { |
573 | 413 rev->handler(rev); |
414 } | |
247
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
415 } |
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
416 |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
417 wev = c->write; |
316
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
418 |
563 | 419 if ((si.si_band & (POLLOUT|POLLHUP|POLLERR)) && wev->active) { |
573 | 420 |
563 | 421 wev->ready = 1; |
573 | 422 |
423 if (flags & NGX_POST_EVENTS) { | |
424 ngx_locked_post_event(wev, &ngx_posted_events); | |
425 | |
426 } else { | |
427 wev->handler(wev); | |
428 } | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
429 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
430 |
567 | 431 return NGX_OK; |
432 | |
563 | 433 } else if (signo == SIGALRM) { |
434 | |
3475
ab353d7dc182
*) introduce ngx_time_sigsafe_update() to update the error log time only
Igor Sysoev <igor@sysoev.ru>
parents:
3474
diff
changeset
|
435 ngx_time_update(); |
567 | 436 |
563 | 437 return NGX_OK; |
438 | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
439 } else if (signo == SIGIO) { |
316
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
440 |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
441 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
442 "rt signal queue overflowed"); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
443 |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
444 /* flush the RT signal queue */ |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
445 |
247
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
446 ngx_memzero(&sa, sizeof(struct sigaction)); |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
447 sa.sa_handler = SIG_DFL; |
247
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
448 sigemptyset(&sa.sa_mask); |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
449 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
450 if (sigaction(rtscf->signo, &sa, NULL) == -1) { |
305
4b1a3a4acc60
nginx-0.0.3-2004-04-02-19:13:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
262
diff
changeset
|
451 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
452 "sigaction(%d, SIG_DFL) failed", rtscf->signo); |
247
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
453 } |
008276b9e061
nginx-0.0.1-2004-02-01-11:10:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
246
diff
changeset
|
454 |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
455 if (sigaction(rtscf->signo + 1, &sa, NULL) == -1) { |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
456 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
457 "sigaction(%d, SIG_DFL) failed", rtscf->signo + 1); |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
458 } |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
459 |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
460 overflow = 1; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
461 overflow_current = 0; |
380
5ce6561246a5
nginx-0.0.7-2004-07-07-10:15:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
375
diff
changeset
|
462 ngx_event_actions.process_events = ngx_rtsig_process_overflow; |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
463 |
352
694d7ddc3599
nginx-0.0.4-2004-06-11-10:15:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
351
diff
changeset
|
464 return NGX_ERROR; |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
465 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
466 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
467 |
567 | 468 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, |
469 "sigtimedwait() returned unexpected signal: %d", signo); | |
316
a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
470 |
567 | 471 return NGX_ERROR; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
472 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
473 |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
474 |
499 | 475 static ngx_int_t |
563 | 476 ngx_rtsig_process_overflow(ngx_cycle_t *cycle, ngx_msec_t timer, |
477 ngx_uint_t flags) | |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
478 { |
354
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
479 int name[2], rtsig_max, rtsig_nr, events, ready; |
eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
352
diff
changeset
|
480 size_t len; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
481 ngx_err_t err; |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
482 ngx_uint_t tested, n, i; |
563 | 483 ngx_event_t *rev, *wev, **queue; |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
484 ngx_connection_t *c; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
485 ngx_rtsig_conf_t *rtscf; |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
486 |
563 | 487 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
488 "rtsig process overflow"); | |
489 | |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
490 rtscf = ngx_event_get_conf(ngx_cycle->conf_ctx, ngx_rtsig_module); |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
491 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
492 tested = 0; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
493 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
494 for ( ;; ) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
495 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
496 n = 0; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
497 while (n < rtscf->overflow_events) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
498 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
499 if (overflow_current == cycle->connection_n) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
500 break; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
501 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
502 |
543 | 503 c = cycle->files[overflow_current++]; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
504 |
559 | 505 if (c == NULL || c->fd == -1) { |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
506 continue; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
507 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
508 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
509 events = 0; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
510 |
509 | 511 if (c->read->active && c->read->handler) { |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
512 events |= POLLIN; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
513 } |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
514 |
509 | 515 if (c->write->active && c->write->handler) { |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
516 events |= POLLOUT; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
517 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
518 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
519 if (events == 0) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
520 continue; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
521 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
522 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
523 overflow_list[n].fd = c->fd; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
524 overflow_list[n].events = events; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
525 overflow_list[n].revents = 0; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
526 n++; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
527 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
528 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
529 if (n == 0) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
530 break; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
531 } |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
532 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
533 for ( ;; ) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
534 ready = poll(overflow_list, n, 0); |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
535 |
563 | 536 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
537 "rtsig overflow poll:%d", ready); | |
538 | |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
539 if (ready == -1) { |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
540 err = ngx_errno; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
541 ngx_log_error((err == NGX_EINTR) ? NGX_LOG_INFO : NGX_LOG_ALERT, |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
542 cycle->log, 0, |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
543 "poll() failed while the overflow recover"); |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
544 |
402
f209f3391020
nginx-0.0.9-2004-07-28-20:16:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
545 if (err == NGX_EINTR) { |
f209f3391020
nginx-0.0.9-2004-07-28-20:16:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
546 continue; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
547 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
548 } |
402
f209f3391020
nginx-0.0.9-2004-07-28-20:16:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
549 |
f209f3391020
nginx-0.0.9-2004-07-28-20:16:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
550 break; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
551 } |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
552 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
553 if (ready <= 0) { |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
554 continue; |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
555 } |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
556 |
563 | 557 ngx_mutex_lock(ngx_posted_events_mutex); |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
558 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
559 for (i = 0; i < n; i++) { |
543 | 560 c = cycle->files[overflow_list[i].fd]; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
561 |
559 | 562 if (c == NULL) { |
563 continue; | |
564 } | |
565 | |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
566 rev = c->read; |
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
567 |
390
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
568 if (rev->active |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
569 && !rev->closed |
509 | 570 && rev->handler |
390
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
571 && (overflow_list[i].revents |
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
572 & (POLLIN|POLLERR|POLLHUP|POLLNVAL))) |
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
573 { |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
574 tested++; |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
575 |
563 | 576 if ((flags & NGX_POST_THREAD_EVENTS) && !rev->accept) { |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
577 rev->posted_ready = 1; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
578 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
579 } else { |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
580 rev->ready = 1; |
563 | 581 } |
582 | |
583 if (flags & NGX_POST_EVENTS) { | |
584 queue = (ngx_event_t **) (rev->accept ? | |
585 &ngx_posted_accept_events : &ngx_posted_events); | |
586 | |
587 ngx_locked_post_event(rev, queue); | |
588 | |
589 } else { | |
590 rev->handler(rev); | |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
591 } |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
592 } |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
593 |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
594 wev = c->write; |
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
595 |
390
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
596 if (wev->active |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
597 && !wev->closed |
509 | 598 && wev->handler |
390
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
599 && (overflow_list[i].revents |
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
600 & (POLLOUT|POLLERR|POLLHUP|POLLNVAL))) |
1471c6fb108a
nginx-0.0.7-2004-07-14-00:24:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
601 { |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
602 tested++; |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
603 |
563 | 604 if (flags & NGX_POST_THREAD_EVENTS) { |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
605 wev->posted_ready = 1; |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
606 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
607 } else { |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
608 wev->ready = 1; |
563 | 609 } |
610 | |
611 if (flags & NGX_POST_EVENTS) { | |
612 ngx_locked_post_event(wev, &ngx_posted_events); | |
613 | |
614 } else { | |
615 wev->handler(wev); | |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
616 } |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
617 } |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
618 } |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
619 |
402
f209f3391020
nginx-0.0.9-2004-07-28-20:16:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
620 ngx_mutex_unlock(ngx_posted_events_mutex); |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
621 |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
622 if (tested >= rtscf->overflow_test) { |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
623 |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
624 if (ngx_linux_rtsig_max) { |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
625 |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
626 /* |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
627 * Check the current rt queue length to prevent |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
628 * the new overflow. |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
629 * |
563 | 630 * learn the "/proc/sys/kernel/rtsig-max" value because |
631 * it can be changed since the last checking | |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
632 */ |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
633 |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
634 name[0] = CTL_KERN; |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
635 name[1] = KERN_RTSIGMAX; |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
636 len = sizeof(rtsig_max); |
493 | 637 |
638 if (sysctl(name, 2, &rtsig_max, &len, NULL, 0) == -1) { | |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
639 ngx_log_error(NGX_LOG_ALERT, cycle->log, errno, |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
640 "sysctl(KERN_RTSIGMAX) failed"); |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
641 return NGX_ERROR; |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
642 } |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
643 |
493 | 644 /* name[0] = CTL_KERN; */ |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
645 name[1] = KERN_RTSIGNR; |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
646 len = sizeof(rtsig_nr); |
493 | 647 |
648 if (sysctl(name, 2, &rtsig_nr, &len, NULL, 0) == -1) { | |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
649 ngx_log_error(NGX_LOG_ALERT, cycle->log, errno, |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
650 "sysctl(KERN_RTSIGNR) failed"); |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
651 return NGX_ERROR; |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
652 } |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
653 |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
654 /* |
563 | 655 * drain the rt signal queue if the /"proc/sys/kernel/rtsig-nr" |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
656 * is bigger than |
563 | 657 * "/proc/sys/kernel/rtsig-max" / "rtsig_overflow_threshold" |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
658 */ |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
659 |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
660 if (rtsig_max / (int) rtscf->overflow_threshold < rtsig_nr) { |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
661 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
662 "rtsig queue state: %d/%d", |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
663 rtsig_nr, rtsig_max); |
563 | 664 while (ngx_rtsig_process_events(cycle, 0, flags) == NGX_OK) |
665 { | |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
666 /* void */ |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
667 } |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
668 } |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
669 |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
670 } else { |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
671 |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
672 /* |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
673 * Linux has not KERN_RTSIGMAX since 2.6.6-mm2 |
402
f209f3391020
nginx-0.0.9-2004-07-28-20:16:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
674 * so drain the rt signal queue unconditionally |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
675 */ |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
676 |
563 | 677 while (ngx_rtsig_process_events(cycle, 0, flags) == NGX_OK) { |
678 /* void */ | |
679 } | |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
680 } |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
681 |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
682 tested = 0; |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
683 } |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
684 } |
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
685 |
563 | 686 if (flags & NGX_UPDATE_TIME) { |
3475
ab353d7dc182
*) introduce ngx_time_sigsafe_update() to update the error log time only
Igor Sysoev <igor@sysoev.ru>
parents:
3474
diff
changeset
|
687 ngx_time_update(); |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
688 } |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
689 |
527 | 690 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
691 "rt signal queue overflow recovered"); |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
692 |
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
693 overflow = 0; |
380
5ce6561246a5
nginx-0.0.7-2004-07-07-10:15:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
375
diff
changeset
|
694 ngx_event_actions.process_events = ngx_rtsig_process_events; |
348
68ff8000a974
nginx-0.0.3-2004-06-09-11:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
695 |
261
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
696 return NGX_OK; |
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
697 } |
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
698 |
bdd631bf1a1c
nginx-0.0.2-2004-02-18-00:11:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
260
diff
changeset
|
699 |
499 | 700 static void * |
701 ngx_rtsig_create_conf(ngx_cycle_t *cycle) | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
702 { |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
703 ngx_rtsig_conf_t *rtscf; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
704 |
501 | 705 rtscf = ngx_palloc(cycle->pool, sizeof(ngx_rtsig_conf_t)); |
706 if (rtscf == NULL) { | |
2912
c7d57b539248
return NULL instead of NGX_CONF_ERROR on a create conf failure
Igor Sysoev <igor@sysoev.ru>
parents:
1939
diff
changeset
|
707 return NULL; |
501 | 708 } |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
709 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
710 rtscf->signo = NGX_CONF_UNSET; |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
711 rtscf->overflow_events = NGX_CONF_UNSET; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
712 rtscf->overflow_test = NGX_CONF_UNSET; |
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
713 rtscf->overflow_threshold = NGX_CONF_UNSET; |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
714 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
715 return rtscf; |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
716 } |
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
717 |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
718 |
499 | 719 static char * |
720 ngx_rtsig_init_conf(ngx_cycle_t *cycle, void *conf) | |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
721 { |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
722 ngx_rtsig_conf_t *rtscf = conf; |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
723 |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
247
diff
changeset
|
724 /* LinuxThreads use the first 3 RT signals */ |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
725 ngx_conf_init_uint_value(rtscf->signo, SIGRTMIN + 10); |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
726 |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
727 ngx_conf_init_uint_value(rtscf->overflow_events, 16); |
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
728 ngx_conf_init_uint_value(rtscf->overflow_test, 32); |
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
729 ngx_conf_init_uint_value(rtscf->overflow_threshold, 10); |
351
af4c6b45a687
nginx-0.0.4-2004-06-10-22:36:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
350
diff
changeset
|
730 |
246
6753e8cdaa2c
nginx-0.0.1-2004-01-30-20:39:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
60
diff
changeset
|
731 return NGX_CONF_OK; |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
732 } |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
733 |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
734 |
499 | 735 static char * |
1354
f69d1aab6a0f
make 64-bit ngx_int_t on 64-bit platforms
Igor Sysoev <igor@sysoev.ru>
parents:
577
diff
changeset
|
736 ngx_check_ngx_overflow_threshold_bounds(ngx_conf_t *cf, void *post, void *data) |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
737 { |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
738 if (ngx_linux_rtsig_max) { |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
739 return ngx_conf_check_num_bounds(cf, post, data); |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
740 } |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
741 |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
742 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
743 "\"rtsig_overflow_threshold\" is not supported " |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
744 "since Linux 2.6.6-mm2, ignored"); |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
745 |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
746 return NGX_CONF_OK; |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
390
diff
changeset
|
747 } |