diff src/event/modules/ngx_rtsig_module.c @ 493:975f62e77f02 release-0.1.21

nginx-0.1.21-RELEASE import *) Bugfix: the ngx_http_stub_status_module showed incorrect statistics if "rtsig" method was used or if several worker process ran on SMP. *) Bugfix: nginx could not be built by the icc compiler on Linux or if the zlib-1.2.x library was building from sources. *) Bugfix: nginx could not be built on NetBSD 2.0.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 22 Feb 2005 14:40:13 +0000
parents 2ff194b74f1e
children 64d9afb209da
line wrap: on
line diff
--- a/src/event/modules/ngx_rtsig_module.c
+++ b/src/event/modules/ngx_rtsig_module.c
@@ -701,18 +701,18 @@ static ngx_int_t ngx_rtsig_process_overf
                 name[0] = CTL_KERN;
                 name[1] = KERN_RTSIGMAX;
                 len = sizeof(rtsig_max);
-                if (sysctl(name, sizeof(name), &rtsig_max, &len, NULL, 0) == -1)
-                {
+
+                if (sysctl(name, 2, &rtsig_max, &len, NULL, 0) == -1) {
                     ngx_log_error(NGX_LOG_ALERT, cycle->log, errno,
                                   "sysctl(KERN_RTSIGMAX) failed");
                     return NGX_ERROR;
                 }
 
-                name[0] = CTL_KERN;
+                /* name[0] = CTL_KERN; */
                 name[1] = KERN_RTSIGNR;
                 len = sizeof(rtsig_nr);
-                if (sysctl(name, sizeof(name), &rtsig_nr, &len, NULL, 0) == -1)
-                {
+
+                if (sysctl(name, 2, &rtsig_nr, &len, NULL, 0) == -1) {
                     ngx_log_error(NGX_LOG_ALERT, cycle->log, errno,
                                   "sysctl(KERN_RTSIGNR) failed");
                     return NGX_ERROR;