Mercurial > hg > nginx
comparison src/os/unix/ngx_files.c @ 1046:bb139aba3199
rename mode to access
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 18 Jan 2007 19:52:18 +0000 |
parents | 72621ebef255 |
children | b5263e401884 |
comparison
equal
deleted
inserted
replaced
1045:1ade5def878d | 1046:bb139aba3199 |
---|---|
110 return n; | 110 return n; |
111 } | 111 } |
112 | 112 |
113 | 113 |
114 ngx_fd_t | 114 ngx_fd_t |
115 ngx_open_tempfile(u_char *name, ngx_uint_t persistent, ngx_uint_t mode) | 115 ngx_open_tempfile(u_char *name, ngx_uint_t persistent, ngx_uint_t access) |
116 { | 116 { |
117 ngx_fd_t fd; | 117 ngx_fd_t fd; |
118 | 118 |
119 fd = open((const char *) name, O_CREAT|O_EXCL|O_RDWR, mode ? mode : 0600); | 119 fd = open((const char *) name, O_CREAT|O_EXCL|O_RDWR, |
120 access ? access : 0600); | |
120 | 121 |
121 if (fd != -1 && !persistent) { | 122 if (fd != -1 && !persistent) { |
122 unlink((const char *) name); | 123 unlink((const char *) name); |
123 } | 124 } |
124 | 125 |