httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server/mpm/prefork prefork.c
Date Sun, 11 Feb 2001 00:24:49 GMT
rbb         01/02/10 16:24:49

  Modified:    server/mpm/prefork prefork.c
  Log:
  Cleanup the rest of the warnings that appear when compileing with
  GRPOF.
  
  Revision  Changes    Path
  1.160     +6 -3      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -u -d -b -w -u -r1.159 -r1.160
  --- prefork.c	2001/02/10 14:04:18	1.159
  +++ prefork.c	2001/02/11 00:24:49	1.160
  @@ -193,22 +193,25 @@
       core_server_config *sconf = 
   	ap_get_module_config(ap_server_conf->module_config, &core_module);    
       char *dir = sconf->gprof_dir;
  +    const char *use_dir;
   
       if(dir) {
  +        apr_status_t res;
   	char buf[512];
   	int len = strlen(sconf->gprof_dir) - 1;
   	if(*(dir + len) == '%') {
   	    dir[len] = '\0';
   	    apr_snprintf(buf, sizeof(buf), "%sgprof.%d", dir, (int)getpid());
   	} 
  -	dir = ap_server_root_relative(pconf, buf[0] ? buf : dir);
  -	if(mkdir(dir, 0755) < 0 && errno != EEXIST) {
  +	use_dir = ap_server_root_relative(pconf, buf[0] ? buf : dir);
  +	res = apr_dir_make(use_dir, 0755, pconf);
  +	if(res != APR_SUCCESS && !APR_STATUS_IS_EEXIST(res)) {
   	    ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf,
   			 "gprof: error creating directory %s", dir);
   	}
       }
       else {
  -	dir = ap_server_root_relative(pconf, "logs");
  +	use_dir = ap_server_root_relative(pconf, "logs");
       }
   
       chdir(dir);
  
  
  

Mime
View raw message