Mercurial > hg > nginx-quic
annotate auto/feature @ 3293:8abb88374c6c
Fix a bug introduced in r2032: After a child process has read a terminate
message from a channel, the process tries to read the channel again.
The kernel (at least FreeBSD) may preempt the process and sends a SIGIO
signal to a master process. The master process sends a new terminate message,
the kernel switches again to the the child process, and the child process
reads the messages instead of an EAGAIN error. And this may repeat over
and over. Being that the child process can not exit the cycle and test
the termination flag set by the message handler.
The fix disallow the master process to send a new terminate message on
SIGIO signal reception. It may send the message only on SIGALARM signal.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 04 Nov 2009 19:41:08 +0000 |
parents | dad4423ef56a |
children | 568a854383f9 |
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:
358
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:
358
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
358
diff
changeset
|
3 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 |
455 | 5 echo $ngx_n "checking for $ngx_feature ...$ngx_c" |
6 | |
7 cat << END >> $NGX_AUTOCONF_ERR | |
8 | |
9 ---------------------------------------- | |
10 checking for $ngx_feature | |
11 | |
12 END | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 ngx_found=no |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
455 | 16 if test -n "$ngx_feature_name"; then |
645 | 17 ngx_have_feature=`echo $ngx_feature_name \ |
18 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` | |
455 | 19 fi |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
20 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
21 if test -n "$ngx_feature_path"; then |
2139 | 22 for ngx_temp in $ngx_feature_path; do |
23 ngx_feature_inc_path="$ngx_feature_inc_path -I $ngx_temp" | |
24 done | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
25 fi |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
26 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 cat << END > $NGX_AUTOTEST.c |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
28 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
29 #include <sys/types.h> |
455 | 30 $NGX_INCLUDE_UNISTD_H |
31 $ngx_feature_incs | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
32 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
33 int main() { |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
34 $ngx_feature_test; |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
35 return 0; |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
36 } |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
38 END |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
39 |
455 | 40 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
41 ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \ |
455 | 42 -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs" |
461 | 43 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
44 ngx_feature_inc_path= |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
45 |
946 | 46 eval "/bin/sh -c \"$ngx_test\" >> $NGX_AUTOCONF_ERR 2>&1" |
455 | 47 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
48 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
49 if [ -x $NGX_AUTOTEST ]; then |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
50 |
619 | 51 case "$ngx_feature_run" in |
52 | |
53 yes) | |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
645
diff
changeset
|
54 # /bin/sh is used to intercept "Killed" or "Abort trap" messages |
705 | 55 if /bin/sh -c $NGX_AUTOTEST >/dev/null 2>&1; then |
619 | 56 echo " found" |
57 ngx_found=yes | |
455 | 58 |
619 | 59 if test -n "$ngx_feature_name"; then |
60 have=$ngx_have_feature . auto/have | |
61 fi | |
455 | 62 |
619 | 63 else |
64 echo " found but is not working" | |
65 fi | |
66 ;; | |
67 | |
68 bug) | |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
645
diff
changeset
|
69 # /bin/sh is used to intercept "Killed" or "Abort trap" messages |
705 | 70 if /bin/sh -c $NGX_AUTOTEST >/dev/null 2>&1; then |
619 | 71 echo " not found" |
455 | 72 |
619 | 73 else |
74 echo " found" | |
75 ngx_found=yes | |
76 | |
77 if test -n "$ngx_feature_name"; then | |
78 have=$ngx_have_feature . auto/have | |
79 fi | |
80 fi | |
81 ;; | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
82 |
619 | 83 *) |
84 echo " found" | |
85 ngx_found=yes | |
455 | 86 |
619 | 87 if test -n "$ngx_feature_name"; then |
88 have=$ngx_have_feature . auto/have | |
89 fi | |
90 ;; | |
455 | 91 |
619 | 92 esac |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
93 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
94 else |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
95 echo " not found" |
455 | 96 |
97 echo "----------" >> $NGX_AUTOCONF_ERR | |
98 cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR | |
99 echo "----------" >> $NGX_AUTOCONF_ERR | |
100 echo $ngx_test >> $NGX_AUTOCONF_ERR | |
101 echo "----------" >> $NGX_AUTOCONF_ERR | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
102 fi |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
103 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
104 rm $NGX_AUTOTEST* |