httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apachen/src/main http_core.c
Date Sat, 22 Nov 1997 01:59:58 GMT
dgaudet     97/11/21 17:59:58

  Modified:    src      CHANGES
               src/main http_core.c
  Log:
  Fix the mmap_handler error messages again.
  
  Submitted by:	Ben Hyde
  Reviewed by:	Dean Gaudet, Randy Terbush, Martin Kraemer
  
  Revision  Changes    Path
  1.517     +3 -0      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.516
  retrieving revision 1.517
  diff -u -r1.516 -r1.517
  --- CHANGES	1997/11/20 00:42:32	1.516
  +++ CHANGES	1997/11/22 01:59:54	1.517
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) Fix the spurious "(0)unknown error: mmap_handler: mmap failed"
  +     error messages. [Ben Hyde]
  +
   Changes with Apache 1.3b3
   
     *) WIN32: Work around brain-damaged spawn calls that can't deal
  
  
  
  1.141     +5 -6      apachen/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- http_core.c	1997/11/15 00:16:50	1.140
  +++ http_core.c	1997/11/22 01:59:57	1.141
  @@ -1864,21 +1864,20 @@
       block_alarms();
       if ((r->finfo.st_size >= MMAP_THRESHOLD)
   	&& ( !r->header_only || (d->content_md5 & 1))) {
  -      /* we need to protect ourselves in case we die while we've got the
  +	/* we need to protect ourselves in case we die while we've got the
    	 * file mmapped */
   	mm = mmap (NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE,
   		    fileno(f), 0);
  +	if (mm == (caddr_t)-1) {
  +	    aplog_error(APLOG_MARK, APLOG_CRIT, r->server,
  +			"default_handler: mmap failed: %s", r->filename);
  +	}
       } else {
   	mm = (caddr_t)-1;
       }
   
       if (mm == (caddr_t)-1) {
   	unblock_alarms();
  -
  -	if (r->finfo.st_size >= MMAP_THRESHOLD) {
  -	    aplog_error(APLOG_MARK, APLOG_CRIT, r->server,
  -			"mmap_handler: mmap failed: %s", r->filename);
  -	}
   #endif
   
   	if (d->content_md5 & 1) {
  
  
  

Mime
View raw message