Mercurial > hg > nginx-ranges
comparison src/os/unix/ngx_shared.c @ 16:74b1868dd3cd NGINX_0_1_8
nginx 0.1.8
*) Bugfix: in the ngx_http_autoindex_module if the long file names were
in the listing.
*) Feature: the "^~" modifier in the location directive.
*) Feature: the proxy_max_temp_file_size directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Sat, 20 Nov 2004 00:00:00 +0300 |
parents | 46833bd150cb |
children | 6f8b0dc0f8dd |
comparison
equal
deleted
inserted
replaced
15:0503cb60c4e4 | 16:74b1868dd3cd |
---|---|
34 | 34 |
35 fd = open("/dev/zero", O_RDWR); | 35 fd = open("/dev/zero", O_RDWR); |
36 | 36 |
37 if (fd == -1) { | 37 if (fd == -1) { |
38 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, | 38 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, |
39 "open(/dev/zero) failed"); | 39 "open(\"/dev/zero\") failed"); |
40 return NULL; | 40 return NULL; |
41 } | 41 } |
42 | 42 |
43 p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); | 43 p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); |
44 | 44 |
47 "mmap(/dev/zero, MAP_SHARED, %uz) failed", size); | 47 "mmap(/dev/zero, MAP_SHARED, %uz) failed", size); |
48 p = NULL; | 48 p = NULL; |
49 } | 49 } |
50 | 50 |
51 if (close(fd) == -1) { | 51 if (close(fd) == -1) { |
52 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, "close() failed"); | 52 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, |
53 "close(\"/dev/zero\") failed"); | |
53 } | 54 } |
54 | 55 |
55 return p; | 56 return p; |
56 } | 57 } |
57 | 58 |