httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/mmap/unix mmap.c
Date Sat, 10 Jun 2000 01:41:07 GMT
dgaudet     00/06/09 18:41:07

  Modified:    src      CHANGES
               src/lib/apr/mmap/unix mmap.c
  Log:
  don't seek when setting up an mmap
  
  Revision  Changes    Path
  1.146     +3 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.145
  retrieving revision 1.146
  diff -u -r1.145 -r1.146
  --- CHANGES	2000/06/09 15:20:10	1.145
  +++ CHANGES	2000/06/10 01:41:06	1.146
  @@ -1,4 +1,7 @@
   Changes with Apache 2.0a5
  +
  +  *) Don't seek when setting up an mmap. [Dean Gaudet]
  +
     *) When mod_cgid is started as root, the cgi daemon now switches 
        to the configured User/Group (like other httpd processes) 
        instead of continuing as root.  [Jeff Trawick]
  
  
  
  1.22      +3 -2      apache-2.0/src/lib/apr/mmap/unix/mmap.c
  
  Index: mmap.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/unix/mmap.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mmap.c	2000/06/01 18:48:24	1.21
  +++ mmap.c	2000/06/10 01:41:06	1.22
  @@ -95,8 +95,9 @@
           return APR_EBADF;
       (*new) = (ap_mmap_t *)ap_pcalloc(cont, sizeof(ap_mmap_t));
       
  -    ap_seek(file, APR_SET, &offset);
   #ifdef BEOS
  +    /* XXX: mmap shouldn't really change the seek offset */
  +    ap_seek(file, APR_SET, &offset);
       pages = ((size -1) / B_PAGE_SIZE) + 1;
   
       aid = create_area(areaname, &mm , B_ANY_ADDRESS, pages * B_PAGE_SIZE,
  @@ -112,7 +113,7 @@
       (*new)->area = aid;
   #else
   
  -    mm = mmap(NULL, size, PROT_READ, MAP_SHARED, file->filedes ,0);
  +    mm = mmap(NULL, size, PROT_READ, MAP_SHARED, file->filedes, offset);
   
       if (mm == (caddr_t)-1) {
           /* we failed to get an mmap'd file... */
  
  
  

Mime
View raw message