You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Roy Fielding <fi...@hyperreal.com> on 1997/05/08 09:57:46 UTC

cvs commit: apache/src CHANGES http_main.c

fielding    97/05/08 00:57:46

  Modified:    src       CHANGES http_main.c
  Log:
  Properly initialize the flock structures used by the mutex locking
  around accept() when USE_FCNTL_SERIALIZED_ACCEPT is defined.
  
  Submitted by: Marc Slemko
  Reviewed by: Roy Fielding, Dean Gaudet
  
  Revision  Changes    Path
  1.267     +4 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.266
  retrieving revision 1.267
  diff -C3 -r1.266 -r1.267
  *** CHANGES	1997/05/08 07:32:32	1.266
  --- CHANGES	1997/05/08 07:57:43	1.267
  ***************
  *** 1,5 ****
  --- 1,9 ----
    Changes with Apache 1.2
    
  +   *) Properly initialize the flock structures used by the mutex locking
  +      around accept() when USE_FCNTL_SERIALIZED_ACCEPT is defined.
  +      [Marc Slemko]
  + 
      *) The method for determining PATH_INFO has been restored to the pre-1.2b
         (and NCSA httpd) definition wherein it was the extra path info beyond
         the CGI script filename.  The environment variable FILEPATH_INFO has
  
  
  
  1.143     +13 -2     apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -C3 -r1.142 -r1.143
  *** http_main.c	1997/04/29 02:39:01	1.142
  --- http_main.c	1997/05/08 07:57:44	1.143
  ***************
  *** 191,198 ****
    #endif
    
    #if defined(USE_FCNTL_SERIALIZED_ACCEPT)
  ! static struct flock lock_it = { F_WRLCK, 0, 0, 0 };
  ! static struct flock unlock_it = { F_UNLCK, 0, 0, 0 };
    
    static int lock_fd=-1;
    
  --- 191,198 ----
    #endif
    
    #if defined(USE_FCNTL_SERIALIZED_ACCEPT)
  ! static struct flock lock_it;
  ! static struct flock unlock_it;
    
    static int lock_fd=-1;
    
  ***************
  *** 204,209 ****
  --- 204,220 ----
    accept_mutex_init(pool *p)
        {
        char lock_fname[256];
  + 
  +     lock_it.l_whence = SEEK_SET;   /* from current point */
  +     lock_it.l_start  = 0;          /* -"- */
  +     lock_it.l_len    = 0;          /* until end of file */
  +     lock_it.l_type   = F_WRLCK;    /* set exclusive/write lock */
  +     lock_it.l_pid    = 0;          /* pid not actually interesting */
  +     unlock_it.l_whence = SEEK_SET; /* from current point */
  +     unlock_it.l_start  = 0;        /* -"- */
  +     unlock_it.l_len    = 0;        /* until end of file */
  +     unlock_it.l_type   = F_UNLCK;  /* set exclusive/write lock */
  +     unlock_it.l_pid    = 0;        /* pid not actually interesting */
    
    #ifdef __MACHTEN__
        strncpy(lock_fname, "/var/tmp/htlock.XXXXXX", sizeof(lock_fname)-1);