Mercurial > hg > nginx-vendor-0-7
diff src/core/ngx_palloc.c @ 278:704622b2528a NGINX_0_5_9
nginx 0.5.9
*) Change: now the ngx_http_memcached_module uses the $memcached_key
variable value as a key.
*) Feature: the $memcached_key variable.
*) Feature: the "clean" parameter in the "client_body_in_file_only"
directive.
*) Feature: the "env" directive.
*) Feature: the "sendfile" directive is available inside the "if" block.
*) Feature: now on failure of the writing to access nginx logs a
message to error_log, but not more often than once a minute.
*) Bugfix: the "access_log off" directive did not always turn off the
logging.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 25 Jan 2007 00:00:00 +0300 |
parents | 6eb1e38f0f1f |
children | 9b7db0df50f0 |
line wrap: on
line diff
--- a/src/core/ngx_palloc.c +++ b/src/core/ngx_palloc.c @@ -243,6 +243,32 @@ ngx_pool_cleanup_file(void *data) } +void +ngx_pool_delete_file(void *data) +{ + ngx_pool_cleanup_file_t *c = data; + + ngx_err_t err; + + ngx_log_debug3(NGX_LOG_DEBUG_ALLOC, c->log, 0, "run cleanup: %p, fd:%d %s", + c, c->fd, c->name); + + if (ngx_delete_file(c->name) == NGX_FILE_ERROR) { + err = ngx_errno; + + if (err != NGX_ENOENT) { + ngx_log_error(NGX_LOG_CRIT, c->log, err, + ngx_delete_file_n " \"%s\" failed", c->name); + } + } + + if (ngx_close_file(c->fd) == NGX_FILE_ERROR) { + ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, + ngx_close_file_n " \"%s\" failed", c->name); + } +} + + #if 0 static void *