Chtobi eto znachilo !?

Igor Sysoev is at rambler-co.ru
Sat Mar 8 14:08:42 MSK 2008


On Sat, Mar 08, 2008 at 02:02:15PM +0300, Igor Sysoev wrote:

> On Sat, Mar 08, 2008 at 04:56:19PM +0600, Denis F. Latypoff wrote:
> 
> > Hello Igor,
> > 
> > Saturday, March 8, 2008, 3:36:42 PM, you wrote:
> > 
> > 
> > > Прилагаемый патч добавляет параметр
> > > --without-rtsig_module
> > > который имеет смысл использовать на современных 2.6 ядрах.
> > 
> > > Интересно было бы увидеть, как выглядят первые 20 строк configure с этим
> > > патчем.
> > 
> > [root at c1 nginx-0.6.26]# ./configure --without-rtsig_module
> > checking for OS
> >  + Linux 2.6.24.3 i686
> > checking for C compiler ... found
> >  + using GNU C compiler
> >  + gcc version: 3.4.6 20060404 (Red Hat 3.4.6-9)
> > checking for gcc -pipe switch ... found
> > checking for gcc variadic macros ... found
> > checking for C99 variadic macros ... found
> > checking for unistd.h ... found
> > checking for inttypes.h ... found
> > checking for limits.h ... found
> > checking for sys/filio.h ... not found
> > checking for crypt.h ... found
> > checking for malloc.h ... found
> > checking for Linux specific features
> > checking for epoll ... found
> 
> Спасибо, работает.

Обновлённый патч, запрещающий вызов sysctl. Нужно убедиться, что собирается.


-- 
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
Index: src/os/unix/ngx_linux_init.c
===================================================================
--- src/os/unix/ngx_linux_init.c	(revision 1239)
+++ src/os/unix/ngx_linux_init.c	(working copy)
@@ -11,7 +11,7 @@
 u_char  ngx_linux_kern_ostype[50];
 u_char  ngx_linux_kern_osrelease[50];
 
-int   ngx_linux_rtsig_max;
+int     ngx_linux_rtsig_max;
 
 
 static ngx_os_io_t ngx_linux_io = {
@@ -32,9 +32,6 @@
 ngx_int_t
 ngx_os_specific_init(ngx_log_t *log)
 {
-    int             name[2];
-    size_t          len;
-    ngx_err_t       err;
     struct utsname  u;
 
     if (uname(&u) == -1) {
@@ -48,6 +45,12 @@
     (void) ngx_cpystrn(ngx_linux_kern_osrelease, (u_char *) u.release,
                        sizeof(ngx_linux_kern_osrelease));
 
+#if (NGX_HAVE_RTSIG)
+    {
+    int        name[2];
+    size_t     len;
+    ngx_err_t  err;
+
     name[0] = CTL_KERN;
     name[1] = KERN_RTSIGMAX;
     len = sizeof(ngx_linux_rtsig_max);
@@ -65,6 +68,8 @@
         ngx_linux_rtsig_max = 0;
     }
 
+    }
+#endif
 
     ngx_os_io = ngx_linux_io;
 
@@ -78,6 +83,8 @@
     ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s",
                   ngx_linux_kern_ostype, ngx_linux_kern_osrelease);
 
+#if (NGX_HAVE_RTSIG)
     ngx_log_error(NGX_LOG_NOTICE, log, 0, "sysctl(KERN_RTSIGMAX): %d",
                   ngx_linux_rtsig_max);
+#endif
 }
Index: auto/os/linux
===================================================================
--- auto/os/linux	(revision 1239)
+++ auto/os/linux	(working copy)
@@ -24,7 +24,8 @@
 
 # enable the rt signals on Linux 2.2.19 and onward
 
-if [ $version -ge 131609 -o $EVENT_RTSIG = YES ]; then
+if [ \( $EVENT_RTSIG = NO -a $version -ge 131609 \) -o $EVENT_RTSIG = YES ]
+then
     echo " + rt signals found"
     have=NGX_HAVE_RTSIG . auto/have
     have=NGX_HAVE_POLL . auto/have
Index: auto/options
===================================================================
--- auto/options	(revision 1239)
+++ auto/options	(working copy)
@@ -142,6 +142,7 @@
         --builddir=*)                    NGX_OBJS="$value"          ;;
 
         --with-rtsig_module)             EVENT_RTSIG=YES            ;;
+        --without-rtsig_module)          EVENT_RTSIG=NONE           ;;
         --with-select_module)            EVENT_SELECT=YES           ;;
         --without-select_module)         EVENT_SELECT=NONE          ;;
         --with-poll_module)              EVENT_POLL=YES             ;;
@@ -264,6 +265,7 @@
   --builddir=DIR                     set the build directory
 
   --with-rtsig_module                enable rtsig module
+  --without-rtsig_module             disable rtsig module
   --with-select_module               enable select module
   --without-select_module            disable select module
   --with-poll_module                 enable poll module


More information about the nginx-ru mailing list