httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Better Solaris fix...
Date Wed, 16 Aug 1995 10:02:55 GMT
Well, it turns out that locking the scoreboard file (as per previous
patch) doesn't work directly, because tmpfs doesn't support locking of
*any* sort.  It does appear to work (I'm running with it on port 80)
with the scoreboard file in /usr/tmp, which is generally not a tmpfs;
revised patch below.

Sun Quality Software... gotta love it.  Waaaaaahhh....

*** http_main.c~	Sat Aug 12 10:45:01 1995
--- http_main.c	Wed Aug 16 09:58:55 1995
***************
*** 140,151 ****
  #ifdef FCNTL_SERIALIZED_ACCEPT
  struct flock lock_it = { F_WRLCK, 0, 0, 0 };
  struct flock unlock_it = { F_UNLCK, 0, 0, 0 };
  
  void accept_mutex_on()
  {
      int ret;
      
!     while ((ret = fcntl(fileno(server_conf->error_log),F_SETLKW, &lock_it)) <
0
  	   && errno == EINTR)
  	continue;
  
--- 140,152 ----
  #ifdef FCNTL_SERIALIZED_ACCEPT
  struct flock lock_it = { F_WRLCK, 0, 0, 0 };
  struct flock unlock_it = { F_UNLCK, 0, 0, 0 };
+ static int scoreboard_fd;
  
  void accept_mutex_on()
  {
      int ret;
      
!     while ((ret = fcntl(scoreboard_fd, F_SETLKW, &lock_it)) < 0
  	   && errno == EINTR)
  	continue;
  
***************
*** 158,164 ****
  
  void accept_mutex_off()
  {
!     fcntl (fileno(server_conf->error_log), F_SETLKW, &unlock_it);
  }
  #else
  /* Default --- no serialization.  Other methods *could* go here,
--- 159,165 ----
  
  void accept_mutex_off()
  {
!     fcntl (scoreboard_fd, F_SETLKW, &unlock_it);
  }
  #else
  /* Default --- no serialization.  Other methods *could* go here,
***************
*** 288,294 ****
   */
  
  static short_score scoreboard_image[HARD_SERVER_MAX];
! static char scoreboard_fname[] = "/tmp/htstatus.XXXXXX";
  static int have_scoreboard_fname = 0;
  static int scoreboard_fd;
  
--- 289,295 ----
   */
  
  static short_score scoreboard_image[HARD_SERVER_MAX];
! static char scoreboard_fname[] = "/usr/tmp/htstatus.XXXXXX";
  static int have_scoreboard_fname = 0;
  static int scoreboard_fd;
  

Mime
View raw message