Mercurial > hg > nginx
comparison src/core/ngx_file.c @ 292:a472bfb778b3
nginx-0.0.3-2004-03-17-00:26:01 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 16 Mar 2004 21:26:01 +0000 |
parents | 87e73f067470 |
children | 744965ec6275 |
comparison
equal
deleted
inserted
replaced
291:117ccc7c4055 | 292:a472bfb778b3 |
---|---|
55 11, "%010u", num); | 55 11, "%010u", num); |
56 | 56 |
57 ngx_create_hashed_filename(file, path); | 57 ngx_create_hashed_filename(file, path); |
58 | 58 |
59 #if 0 | 59 #if 0 |
60 #if (WIN32) | 60 file->fd = ngx_open_tempfile(file->name.data, persistent); |
61 file->fd = CreateFile(file->name.data, | |
62 GENERIC_READ|GENERIC_WRITE, | |
63 FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, | |
64 NULL, | |
65 CREATE_NEW, | |
66 persistent ? 0: | |
67 FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE, | |
68 NULL); | |
69 #else | 61 #else |
70 file->fd = open(file->name.data, O_CREAT|O_EXCL|O_WRONLY, 0600); | 62 file->fd = ngx_open_tempfile(file->name.data, 1); |
71 #endif | 63 #endif |
72 #endif | |
73 | |
74 #if 0 | |
75 file->fd = ngx_open_tempfile(file->name.data, persistent); | |
76 #endif | |
77 file->fd = ngx_open_tempfile(file->name.data, 1); | |
78 | 64 |
79 ngx_log_debug1(NGX_LOG_DEBUG_CORE, file->log, 0, | 65 ngx_log_debug1(NGX_LOG_DEBUG_CORE, file->log, 0, |
80 "temp fd:%d", file->fd); | 66 "temp fd:%d", file->fd); |
81 | 67 |
82 if (file->fd != NGX_INVALID_FILE) { | 68 if (file->fd != NGX_INVALID_FILE) { |