comparison src/os/unix/ngx_freebsd_init.c @ 10:46833bd150cb NGINX_0_1_5

nginx 0.1.5 *) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
author Igor Sysoev <http://sysoev.ru>
date Thu, 11 Nov 2004 00:00:00 +0300
parents cc9f381affaa
children 6f8b0dc0f8dd
comparison
equal deleted inserted replaced
9:77eee314ddbd 10:46833bd150cb
7 #include <ngx_config.h> 7 #include <ngx_config.h>
8 #include <ngx_core.h> 8 #include <ngx_core.h>
9 9
10 10
11 /* FreeBSD 3.0 at least */ 11 /* FreeBSD 3.0 at least */
12 char ngx_freebsd_kern_ostype[20]; 12 char ngx_freebsd_kern_ostype[16];
13 char ngx_freebsd_kern_osrelease[20]; 13 char ngx_freebsd_kern_osrelease[128];
14 int ngx_freebsd_kern_osreldate; 14 int ngx_freebsd_kern_osreldate;
15 int ngx_freebsd_hw_ncpu; 15 int ngx_freebsd_hw_ncpu;
16 int ngx_freebsd_net_inet_tcp_sendspace; 16 int ngx_freebsd_net_inet_tcp_sendspace;
17 17
18 /* FreeBSD 4.9 */ 18 /* FreeBSD 4.9 */
93 size = sizeof(ngx_freebsd_kern_ostype); 93 size = sizeof(ngx_freebsd_kern_ostype);
94 if (sysctlbyname("kern.ostype", 94 if (sysctlbyname("kern.ostype",
95 ngx_freebsd_kern_ostype, &size, NULL, 0) == -1) { 95 ngx_freebsd_kern_ostype, &size, NULL, 0) == -1) {
96 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 96 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
97 "sysctlbyname(kern.ostype) failed"); 97 "sysctlbyname(kern.ostype) failed");
98 return NGX_ERROR; 98
99 if (ngx_errno != NGX_ENOMEM) {
100 return NGX_ERROR;
101 }
102
103 ngx_freebsd_kern_ostype[size - 1] = '\0';
99 } 104 }
100 105
101 size = sizeof(ngx_freebsd_kern_osrelease); 106 size = sizeof(ngx_freebsd_kern_osrelease);
102 if (sysctlbyname("kern.osrelease", 107 if (sysctlbyname("kern.osrelease",
103 ngx_freebsd_kern_osrelease, &size, NULL, 0) == -1) { 108 ngx_freebsd_kern_osrelease, &size, NULL, 0) == -1) {
104 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 109 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
105 "sysctlbyname(kern.osrelease) failed"); 110 "sysctlbyname(kern.osrelease) failed");
106 return NGX_ERROR; 111
112 if (ngx_errno != NGX_ENOMEM) {
113 return NGX_ERROR;
114 }
115
116 ngx_freebsd_kern_osrelease[size - 1] = '\0';
107 } 117 }
108 118
109 119
110 size = sizeof(int); 120 size = sizeof(int);
111 if (sysctlbyname("kern.osreldate", 121 if (sysctlbyname("kern.osreldate",