Mercurial > hg > nginx-vendor-1-0
annotate src/os/unix/ngx_linux_init.c @ 644:ad25218fd14b NGINX_1_0_12
nginx 1.0.12
*) Feature: the "TLSv1.1" and "TLSv1.2" parameters of the
"ssl_protocols" directive.
*) Feature: the "if" SSI command supports captures in regular
expressions.
*) Bugfix: the "if" SSI command did not work inside the "block" command.
*) Bugfix: in AIO error handling on FreeBSD.
*) Bugfix: in the OpenSSL library initialization.
*) Bugfix: the "worker_cpu_affinity" directive might not work.
*) Bugfix: the "limit_conn_log_level" and "limit_req_log_level"
directives might not work.
*) Bugfix: the "read_ahead" directive might not work combined with
"try_files" and "open_file_cache".
*) Bugfix: the "proxy_cache_use_stale" directive with "error" parameter
did not return answer from cache if there were no live upstreams.
*) Bugfix: a segmentation fault might occur in a worker process if small
time was used in the "inactive" parameter of the "proxy_cache_path"
directive.
*) Bugfix: responses from cache might hang.
*) Bugfix: in error handling while connecting to a backend.
Thanks to Piotr Sikora.
*) Bugfix: in the "epoll" event method.
Thanks to Yichun Zhang.
*) Bugfix: the $sent_http_cache_control variable might contain a wrong
value if the "expires" directive was used.
Thanks to Yichun Zhang.
*) Bugfix: the "limit_rate" directive did not allow to use full
throughput, even if limit value was very high.
*) Bugfix: the "sendfile_max_chunk" directive did not work, if the
"limit_rate" directive was used.
*) Bugfix: nginx could not be built on Solaris; the bug had appeared in
1.0.11.
*) Bugfix: in the ngx_http_scgi_module.
*) Bugfix: in the ngx_http_mp4_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 06 Feb 2012 00:00:00 +0400 |
parents | babd3d9efb62 |
children |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
644 | 4 * Copyright (C) Nginx, Inc. |
0 | 5 */ |
6 | |
7 | |
8 #include <ngx_config.h> | |
9 #include <ngx_core.h> | |
10 | |
11 | |
344 | 12 u_char ngx_linux_kern_ostype[50]; |
13 u_char ngx_linux_kern_osrelease[50]; | |
222 | 14 |
366 | 15 int ngx_linux_rtsig_max; |
0 | 16 |
17 | |
88 | 18 static ngx_os_io_t ngx_linux_io = { |
0 | 19 ngx_unix_recv, |
20 ngx_readv_chain, | |
354 | 21 ngx_udp_unix_recv, |
0 | 22 ngx_unix_send, |
18 | 23 #if (NGX_HAVE_SENDFILE) |
0 | 24 ngx_linux_sendfile_chain, |
25 NGX_IO_SENDFILE | |
26 #else | |
27 ngx_writev_chain, | |
28 0 | |
29 #endif | |
30 }; | |
31 | |
32 | |
42 | 33 ngx_int_t |
88 | 34 ngx_os_specific_init(ngx_log_t *log) |
0 | 35 { |
344 | 36 struct utsname u; |
0 | 37 |
344 | 38 if (uname(&u) == -1) { |
39 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, "uname() failed"); | |
0 | 40 return NGX_ERROR; |
41 } | |
42 | |
344 | 43 (void) ngx_cpystrn(ngx_linux_kern_ostype, (u_char *) u.sysname, |
44 sizeof(ngx_linux_kern_ostype)); | |
0 | 45 |
344 | 46 (void) ngx_cpystrn(ngx_linux_kern_osrelease, (u_char *) u.release, |
47 sizeof(ngx_linux_kern_osrelease)); | |
0 | 48 |
366 | 49 #if (NGX_HAVE_RTSIG) |
50 { | |
51 int name[2]; | |
52 size_t len; | |
53 ngx_err_t err; | |
54 | |
222 | 55 name[0] = CTL_KERN; |
0 | 56 name[1] = KERN_RTSIGMAX; |
57 len = sizeof(ngx_linux_rtsig_max); | |
42 | 58 |
59 if (sysctl(name, 2, &ngx_linux_rtsig_max, &len, NULL, 0) == -1) { | |
16 | 60 err = ngx_errno; |
61 | |
222 | 62 if (err != NGX_ENOTDIR && err != NGX_ENOSYS) { |
16 | 63 ngx_log_error(NGX_LOG_ALERT, log, err, |
64 "sysctl(KERN_RTSIGMAX) failed"); | |
65 | |
66 return NGX_ERROR; | |
67 } | |
68 | |
0 | 69 ngx_linux_rtsig_max = 0; |
70 } | |
71 | |
366 | 72 } |
73 #endif | |
0 | 74 |
88 | 75 ngx_os_io = ngx_linux_io; |
76 | |
77 return NGX_OK; | |
0 | 78 } |
79 | |
80 | |
42 | 81 void |
88 | 82 ngx_os_specific_status(ngx_log_t *log) |
0 | 83 { |
80 | 84 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", |
0 | 85 ngx_linux_kern_ostype, ngx_linux_kern_osrelease); |
86 | |
366 | 87 #if (NGX_HAVE_RTSIG) |
80 | 88 ngx_log_error(NGX_LOG_NOTICE, log, 0, "sysctl(KERN_RTSIGMAX): %d", |
0 | 89 ngx_linux_rtsig_max); |
366 | 90 #endif |
0 | 91 } |