/[hydra]/hydra/src/boa.c
ViewVC logotype

Diff of /hydra/src/boa.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by nmav, Wed Oct 2 19:42:00 2002 UTC revision 1.20 by nmav, Wed Oct 2 20:07:25 2002 UTC
# Line 530  static void create_server_names() Line 530  static void create_server_names()
530  #endif  #endif
531  }  }
532    
533    #ifndef LONG_MAX
534    # define LONG_MAX 2147483647L
535    #endif
536    
537  #ifdef HAVE_GETRLIMIT  #ifdef HAVE_GETRLIMIT
538    
539  #ifndef RLIMIT_NOFILE  #ifndef RLIMIT_NOFILE
540  # define RLIMIT_NOFILE RLIMIT_OFILE  # define RLIMIT_NOFILE RLIMIT_OFILE
541  #endif  #endif
542    
 #ifndef LONG_MAX  
 # define LONG_MAX 2147483647L  
 #endif  
   
543  #define SET_MAX_CON( lim) \  #define SET_MAX_CON( lim) \
544           if (lim == RLIM_INFINITY) { \           if (lim == RLIM_INFINITY) { \
545              max_connections = LONG_MAX; \              max_connections = LONG_MAX; \
# Line 552  static void initialize_rlimits( ) Line 552  static void initialize_rlimits( )
552  int c;  int c;
553  struct rlimit rl;  struct rlimit rl;
554    
555     if (max_connections > 0 && max_connections < 1) {     if (max_connections < 1) {
556        /* has not been set explicitly */        /* has not been set explicitly */
557        c = getrlimit(RLIMIT_NOFILE, &rl);        c = getrlimit(RLIMIT_NOFILE, &rl);
558        if (c < 0) {        if (c < 0) {
# Line 579  struct rlimit rl; Line 579  struct rlimit rl;
579  #else /* rlimits are not present */  #else /* rlimits are not present */
580  static void initialize_rlimits( )  static void initialize_rlimits( )
581  {  {
582       max_connections = LONG_MAX;
583     return;     return;
584  }  }
585  #endif  #endif

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26