comparison src/os/unix/ngx_shared.c @ 467:bbd6b0b4a2b1 release-0.1.8

nginx-0.1.8-RELEASE import *) 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 <igor@sysoev.ru>
date Sat, 20 Nov 2004 19:52:20 +0000
parents a88a3e4e158f
children 2ff194b74f1e
comparison
equal deleted inserted replaced
466:ee6d66462bff 467:bbd6b0b4a2b1
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