Mercurial > hg > nginx-quic
annotate auto/lib/zlib/conf @ 8896:aa28c802409f
Resolver: make TCP write timer event cancelable.
Similar to 70e65bf8dfd7, the change is made to ensure that the ability to
cancel resolver tasks is fully controlled by the caller. As mentioned in the
referenced commit, it is safe to make this timer cancelable because resolve
tasks can have their own timeouts that are not cancelable.
The scenario where this may become a problem is a periodic background resolve
task (not tied to a specific request or a client connection), which receives a
response with short TTL, large enough to warrant fallback to a TCP query.
With each event loop wakeup, we either have a previously set write timer
instance or schedule a new one. The non-cancelable write timer can delay or
block graceful shutdown of a worker even if the ngx_resolver_ctx_t->cancelable
flag is set by the API user, and there are no other tasks or connections.
We use the resolver API in this way to maintain the list of upstream server
addresses specified with the 'resolve' parameter, and there could be third-party
modules implementing similar logic.
author | Aleksei Bavshin <a.bavshin@f5.com> |
---|---|
date | Wed, 01 Jun 2022 20:17:23 -0700 |
parents | 78f8ac479735 |
children |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
4 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
253
b6793bc5034b
nginx-0.0.2-2004-02-09-10:46:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
6 if [ $ZLIB != NONE ]; then |
297
ee394e997c77
nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
295
diff
changeset
|
7 CORE_INCS="$CORE_INCS $ZLIB" |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 |
455 | 9 case "$NGX_CC_NAME" in |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
10 |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4987
diff
changeset
|
11 msvc | owc | bcc) |
4987
66d001c5378c
Configure: added the NGX_ZLIB define.
Valentin Bartenev <vbart@nginx.com>
parents:
4412
diff
changeset
|
12 have=NGX_ZLIB . auto/have |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
13 LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib" |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
14 CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib" |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
15 ;; |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
16 |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4987
diff
changeset
|
17 icc) |
4987
66d001c5378c
Configure: added the NGX_ZLIB define.
Valentin Bartenev <vbart@nginx.com>
parents:
4412
diff
changeset
|
18 have=NGX_ZLIB . auto/have |
288
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
19 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
20 |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
21 # to allow -ipo optimization we link with the *.o but not library |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
22 CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o" |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
23 CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o" |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
24 CORE_LIBS="$CORE_LIBS $ZLIB/deflate.o" |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
25 CORE_LIBS="$CORE_LIBS $ZLIB/trees.o" |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
26 CORE_LIBS="$CORE_LIBS $ZLIB/zutil.o" |
493 | 27 CORE_LIBS="$CORE_LIBS $ZLIB/compress.o" |
288
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
28 |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
29 if [ $ZLIB_ASM != NO ]; then |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
30 CORE_LIBS="$CORE_LIBS $ZLIB/match.o" |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
31 fi |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
32 ;; |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
282
diff
changeset
|
33 |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
34 *) |
4987
66d001c5378c
Configure: added the NGX_ZLIB define.
Valentin Bartenev <vbart@nginx.com>
parents:
4412
diff
changeset
|
35 have=NGX_ZLIB . auto/have |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
36 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" |
306
6b91bfbc4123
nginx-0.0.3-2004-04-05-00:32:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
37 CORE_LIBS="$CORE_LIBS $ZLIB/libz.a" |
6b91bfbc4123
nginx-0.0.3-2004-04-05-00:32:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
38 #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz" |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
39 ;; |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
40 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
41 esac |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
42 |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 else |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
44 |
493 | 45 if [ "$NGX_PLATFORM" != win32 ]; then |
455 | 46 ZLIB=NO |
320
d621239c30f7
nginx-0.0.3-2004-04-18-23:06:02 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
47 |
d621239c30f7
nginx-0.0.3-2004-04-18-23:06:02 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
48 # FreeBSD, Solaris, Linux |
d621239c30f7
nginx-0.0.3-2004-04-18-23:06:02 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
49 |
455 | 50 ngx_feature="zlib library" |
4987
66d001c5378c
Configure: added the NGX_ZLIB define.
Valentin Bartenev <vbart@nginx.com>
parents:
4412
diff
changeset
|
51 ngx_feature_name="NGX_ZLIB" |
455 | 52 ngx_feature_run=no |
53 ngx_feature_incs="#include <zlib.h>" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
493
diff
changeset
|
54 ngx_feature_path= |
455 | 55 ngx_feature_libs="-lz" |
56 ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)" | |
57 . auto/feature | |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
58 |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
59 |
307
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
60 if [ $ngx_found = yes ]; then |
455 | 61 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
307
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
306
diff
changeset
|
62 ZLIB=YES |
455 | 63 ngx_found=no |
3684
4d47a0658e7d
stop ./configure on Win32 if no library sources was specified,
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
64 fi |
4d47a0658e7d
stop ./configure on Win32 if no library sources was specified,
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
65 fi |
2893
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
66 |
3684
4d47a0658e7d
stop ./configure on Win32 if no library sources was specified,
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
67 if [ $ZLIB != YES ]; then |
2893
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
68 cat << END |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
69 |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
70 $0: error: the HTTP gzip module requires the zlib library. |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
71 You can either disable the module by using --without-http_gzip_module |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
72 option, or install the zlib library into the system, or build the zlib library |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
73 statically from the source with nginx by using --with-zlib=<path> option. |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
74 |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
75 END |
3684
4d47a0658e7d
stop ./configure on Win32 if no library sources was specified,
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
76 exit 1 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
77 fi |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
78 |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
79 fi |