[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src exim.c
ph10 2004/10/18 10:26:02 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         exim.c 
  Log:
  If setrlimit() barfs at 1000 file descriptors, try for 256 to
  accommodate those old OS for which this is the upper limit.


  Revision  Changes    Path
  1.8       +6 -1      exim/exim-doc/doc-txt/ChangeLog
  1.4       +11 -2     exim/exim-src/src/exim.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ChangeLog    18 Oct 2004 09:16:57 -0000    1.7
  +++ ChangeLog    18 Oct 2004 09:26:02 -0000    1.8
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.7 2004/10/18 09:16:57 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.8 2004/10/18 09:26:02 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -25,7 +25,12 @@
       now done for all such subprocesses. The other cases are: ${run, transport
       filters, and the commands run by the lmtp and pipe transports.


  - 5. Added CONFIGURE_GROUP build-time option.
  + 6. Added CONFIGURE_GROUP build-time option.
  +
  + 7. Some older OS have a limit of 256 on the maximum number of file
  +    descriptors. Exim was using setrlimit() to set 1000 as a large value
  +    unlikely to be exceeded. Change 4.43/17 caused a lot of logging on these
  +    systems. I've change it so that if it can't get 1000, it tries for 256.



Exim version 4.43

  Index: exim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/exim.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- exim.c    18 Oct 2004 09:16:57 -0000    1.3
  +++ exim.c    18 Oct 2004 09:26:02 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/exim.c,v 1.3 2004/10/18 09:16:57 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/exim.c,v 1.4 2004/10/18 09:26:02 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -2837,12 +2837,21 @@
         strerror(errno));
       rlp.rlim_cur = rlp.rlim_max = 0;
       }
  +    
  +  /* I originally chose 1000 as a nice big number that was unlikely to 
  +  be exceeded. It turns out that some older OS have a fixed upper limit of
  +  256. */
  +     
     if (rlp.rlim_cur < 1000)
       {
       rlp.rlim_cur = rlp.rlim_max = 1000;
       if (setrlimit(RLIMIT_NOFILE, &rlp) < 0)
  -      log_write(0, LOG_MAIN|LOG_PANIC, "setrlimit(RLIMIT_NOFILE) failed: %s",
  -        strerror(errno));
  +      { 
  +      rlp.rlim_cur = rlp.rlim_max = 256;
  +      if (setrlimit(RLIMIT_NOFILE, &rlp) < 0)
  +        log_write(0, LOG_MAIN|LOG_PANIC, "setrlimit(RLIMIT_NOFILE) failed: %s",
  +          strerror(errno));
  +      } 
       }
     #endif