Mercurial > hg > nginx
annotate auto/configure @ 9270:3d455e37abf8 default tip
Core: PID file writing synchronization.
Now, ngx_daemon() does not call exit() in the parent process immediately,
but instead waits for the child process to signal it actually started (and
wrote the PID file if configured to). This ensures that the PID file
already exists when the parent process exits.
To make sure that signal handlers won't cause unexpected logging in the
parent process if the child process dies (for example, due to errors when
writing the PID file), ngx_init_signals() is moved to the child process.
This resolves "PID file ... not readable (yet?) after start" and "Failed
to parse PID from file..." errors as observed with systemd.
Note that the errors observed are considered to be a bug in systemd, which
isn't able to work properly with traditional Unix daemons. Still, the
workaround is implemented to make sure there will be no OS vendor patches
trying to address this.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 13 May 2024 06:13:22 +0300 |
parents | 79c04253bc43 |
children |
rev | line source |
---|---|
275
b836469c37c3
nginx-0.0.2-2004-03-02-18:40:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
266
diff
changeset
|
1 #!/bin/sh |
192
31824be1fc66
nginx-0.0.1-2003-11-20-10:05:50 import; auto/configure
Igor Sysoev <igor@sysoev.ru>
parents:
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:
440
diff
changeset
|
3 # Copyright (C) Igor Sysoev |
4412 | 4 # 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:
440
diff
changeset
|
5 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
6 |
4761
3010db312c91
Made sure to run configure in a "C" locale.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
7 LC_ALL=C |
3010db312c91
Made sure to run configure in a "C" locale.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
8 export LC_ALL |
3010db312c91
Made sure to run configure in a "C" locale.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
9 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
194
diff
changeset
|
10 . auto/options |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
194
diff
changeset
|
11 . auto/init |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
194
diff
changeset
|
12 . auto/sources |
194
2357fa41738a
nginx-0.0.1-2003-11-21-09:30:49 import
Igor Sysoev <igor@sysoev.ru>
parents:
193
diff
changeset
|
13 |
6195
e69d5e9be292
Configure: create missing intermediates for build directory.
Piotr Sikora <piotr@cloudflare.com>
parents:
6018
diff
changeset
|
14 test -d $NGX_OBJS || mkdir -p $NGX_OBJS |
455 | 15 |
16 echo > $NGX_AUTO_HEADERS_H | |
467 | 17 echo > $NGX_AUTOCONF_ERR |
18 | |
945 | 19 echo "#define NGX_CONFIGURE \"$NGX_CONFIGURE\"" > $NGX_AUTO_CONFIG_H |
20 | |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
21 |
469 | 22 if [ $NGX_DEBUG = YES ]; then |
285
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
275
diff
changeset
|
23 have=NGX_DEBUG . auto/have |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
275
diff
changeset
|
24 fi |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
275
diff
changeset
|
25 |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
275
diff
changeset
|
26 |
563 | 27 if test -z "$NGX_PLATFORM"; then |
28 echo "checking for OS" | |
29 | |
30 NGX_SYSTEM=`uname -s 2>/dev/null` | |
31 NGX_RELEASE=`uname -r 2>/dev/null` | |
32 NGX_MACHINE=`uname -m 2>/dev/null` | |
33 | |
34 echo " + $NGX_SYSTEM $NGX_RELEASE $NGX_MACHINE" | |
35 | |
36 NGX_PLATFORM="$NGX_SYSTEM:$NGX_RELEASE:$NGX_MACHINE"; | |
37 | |
2828
f5c80c69a72e
backout -r2827 and add correct fix
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
38 case "$NGX_SYSTEM" in |
7030
4a343228c55e
Configure: fix compilation on MSYS2 / MinGW64.
Orgad Shaneh <orgads@gmail.com>
parents:
6195
diff
changeset
|
39 MINGW32_* | MINGW64_* | MSYS_*) |
2828
f5c80c69a72e
backout -r2827 and add correct fix
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
40 NGX_PLATFORM=win32 |
f5c80c69a72e
backout -r2827 and add correct fix
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
41 ;; |
f5c80c69a72e
backout -r2827 and add correct fix
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
42 esac |
f5c80c69a72e
backout -r2827 and add correct fix
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
43 |
563 | 44 else |
45 echo "building for $NGX_PLATFORM" | |
946 | 46 NGX_SYSTEM=$NGX_PLATFORM |
8128
79c04253bc43
Win32: i386 now assumed when crossbuilding (ticket #2416).
Maxim Dounin <mdounin@mdounin.ru>
parents:
7744
diff
changeset
|
47 NGX_MACHINE=i386 |
563 | 48 fi |
49 | |
946 | 50 . auto/cc/conf |
563 | 51 |
469 | 52 if [ "$NGX_PLATFORM" != win32 ]; then |
253
b6793bc5034b
nginx-0.0.2-2004-02-09-10:46:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
248
diff
changeset
|
53 . auto/headers |
b6793bc5034b
nginx-0.0.2-2004-02-09-10:46:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
248
diff
changeset
|
54 fi |
b6793bc5034b
nginx-0.0.2-2004-02-09-10:46:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
248
diff
changeset
|
55 |
561 | 56 . auto/os/conf |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
57 |
469 | 58 if [ "$NGX_PLATFORM" != win32 ]; then |
3931
c8884c8f7c74
Support POSIX semaphores on Linux.
Igor Sysoev <igor@sysoev.ru>
parents:
3637
diff
changeset
|
59 . auto/unix |
266
5238e93961a1
nginx-0.0.2-2004-02-23-23:57:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
256
diff
changeset
|
60 fi |
5238e93961a1
nginx-0.0.2-2004-02-23-23:57:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
256
diff
changeset
|
61 |
6018
466bd63b63d1
Thread pools implementation.
Valentin Bartenev <vbart@nginx.com>
parents:
5701
diff
changeset
|
62 . auto/threads |
457 | 63 . auto/modules |
64 . auto/lib/conf | |
65 | |
2758 | 66 case ".$NGX_PREFIX" in |
67 .) | |
68 NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx} | |
69 have=NGX_PREFIX value="\"$NGX_PREFIX/\"" . auto/define | |
70 ;; | |
194
2357fa41738a
nginx-0.0.1-2003-11-21-09:30:49 import
Igor Sysoev <igor@sysoev.ru>
parents:
193
diff
changeset
|
71 |
2758 | 72 .!) |
73 NGX_PREFIX= | |
74 ;; | |
75 | |
76 *) | |
77 have=NGX_PREFIX value="\"$NGX_PREFIX/\"" . auto/define | |
78 ;; | |
79 esac | |
80 | |
81 if [ ".$NGX_CONF_PREFIX" != "." ]; then | |
82 have=NGX_CONF_PREFIX value="\"$NGX_CONF_PREFIX/\"" . auto/define | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
194
diff
changeset
|
83 fi |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
84 |
469 | 85 have=NGX_SBIN_PATH value="\"$NGX_SBIN_PATH\"" . auto/define |
86 have=NGX_CONF_PATH value="\"$NGX_CONF_PATH\"" . auto/define | |
87 have=NGX_PID_PATH value="\"$NGX_PID_PATH\"" . auto/define | |
611 | 88 have=NGX_LOCK_PATH value="\"$NGX_LOCK_PATH\"" . auto/define |
2743
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
1352
diff
changeset
|
89 have=NGX_ERROR_LOG_PATH value="\"$NGX_ERROR_LOG_PATH\"" . auto/define |
479 | 90 |
7744
f18db38a9826
Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents:
7030
diff
changeset
|
91 if [ ".$NGX_ERROR_LOG_PATH" = "." ]; then |
f18db38a9826
Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents:
7030
diff
changeset
|
92 have=NGX_ERROR_LOG_STDERR . auto/have |
f18db38a9826
Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents:
7030
diff
changeset
|
93 fi |
f18db38a9826
Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents:
7030
diff
changeset
|
94 |
469 | 95 have=NGX_HTTP_LOG_PATH value="\"$NGX_HTTP_LOG_PATH\"" . auto/define |
479 | 96 have=NGX_HTTP_CLIENT_TEMP_PATH value="\"$NGX_HTTP_CLIENT_TEMP_PATH\"" |
97 . auto/define | |
98 have=NGX_HTTP_PROXY_TEMP_PATH value="\"$NGX_HTTP_PROXY_TEMP_PATH\"" | |
99 . auto/define | |
100 have=NGX_HTTP_FASTCGI_TEMP_PATH value="\"$NGX_HTTP_FASTCGI_TEMP_PATH\"" | |
101 . auto/define | |
3549
0b3613117ac5
./configure --http-uwsgi-temp-path=PATH
Igor Sysoev <igor@sysoev.ru>
parents:
2828
diff
changeset
|
102 have=NGX_HTTP_UWSGI_TEMP_PATH value="\"$NGX_HTTP_UWSGI_TEMP_PATH\"" |
0b3613117ac5
./configure --http-uwsgi-temp-path=PATH
Igor Sysoev <igor@sysoev.ru>
parents:
2828
diff
changeset
|
103 . auto/define |
3637 | 104 have=NGX_HTTP_SCGI_TEMP_PATH value="\"$NGX_HTTP_SCGI_TEMP_PATH\"" |
105 . auto/define | |
337
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
303
diff
changeset
|
106 |
2758 | 107 . auto/make |
108 . auto/lib/make | |
109 . auto/install | |
110 | |
111 # STUB | |
112 . auto/stubs | |
113 | |
455 | 114 have=NGX_USER value="\"$NGX_USER\"" . auto/define |
115 have=NGX_GROUP value="\"$NGX_GROUP\"" . auto/define | |
116 | |
5701
1209b8a7b077
Configure: the --build= option.
Ruslan Ermilov <ru@nginx.com>
parents:
4761
diff
changeset
|
117 if [ ".$NGX_BUILD" != "." ]; then |
1209b8a7b077
Configure: the --build= option.
Ruslan Ermilov <ru@nginx.com>
parents:
4761
diff
changeset
|
118 have=NGX_BUILD value="\"$NGX_BUILD\"" . auto/define |
1209b8a7b077
Configure: the --build= option.
Ruslan Ermilov <ru@nginx.com>
parents:
4761
diff
changeset
|
119 fi |
1209b8a7b077
Configure: the --build= option.
Ruslan Ermilov <ru@nginx.com>
parents:
4761
diff
changeset
|
120 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
121 . auto/summary |