mirror of
https://github.com/nginx/nginx.git
synced 2025-06-16 16:51:05 +08:00
create the only cleanup
This commit is contained in:
parent
719688a10d
commit
3b112b8c21
@ -61,17 +61,17 @@ ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, ngx_pool_t *pool,
|
|||||||
|
|
||||||
n = (uint32_t) ngx_next_temp_number(0);
|
n = (uint32_t) ngx_next_temp_number(0);
|
||||||
|
|
||||||
|
cln = ngx_pool_cleanup_add(pool, sizeof(ngx_pool_cleanup_file_t));
|
||||||
|
if (cln == NULL) {
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
for ( ;; ) {
|
for ( ;; ) {
|
||||||
(void) ngx_sprintf(file->name.data + path->name.len + 1 + path->len,
|
(void) ngx_sprintf(file->name.data + path->name.len + 1 + path->len,
|
||||||
"%010uD%Z", n);
|
"%010uD%Z", n);
|
||||||
|
|
||||||
ngx_create_hashed_filename(file, path);
|
ngx_create_hashed_filename(file, path);
|
||||||
|
|
||||||
cln = ngx_pool_cleanup_add(pool, sizeof(ngx_pool_cleanup_file_t));
|
|
||||||
if (cln == NULL) {
|
|
||||||
return NGX_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
file->fd = ngx_open_tempfile(file->name.data, persistent, access);
|
file->fd = ngx_open_tempfile(file->name.data, persistent, access);
|
||||||
|
|
||||||
ngx_log_debug1(NGX_LOG_DEBUG_CORE, file->log, 0,
|
ngx_log_debug1(NGX_LOG_DEBUG_CORE, file->log, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user