comparison src/os/unix/ngx_shared.c @ 10:46833bd150cb NGINX_0_1_5

nginx 0.1.5 *) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
author Igor Sysoev <http://sysoev.ru>
date Thu, 11 Nov 2004 00:00:00 +0300
parents f0b350454894
children 74b1868dd3cd
comparison
equal deleted inserted replaced
9:77eee314ddbd 10:46833bd150cb
16 16
17 p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0); 17 p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
18 18
19 if (p == MAP_FAILED) { 19 if (p == MAP_FAILED) {
20 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 20 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
21 "mmap(MAP_ANON|MAP_SHARED, " SIZE_T_FMT ") failed", 21 "mmap(MAP_ANON|MAP_SHARED, %uz) failed", size);
22 size);
23 return NULL; 22 return NULL;
24 } 23 }
25 24
26 return p; 25 return p;
27 } 26 }
43 42
44 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);
45 44
46 if (p == MAP_FAILED) { 45 if (p == MAP_FAILED) {
47 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 46 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
48 "mmap(/dev/zero, MAP_SHARED, " SIZE_T_FMT ") failed", 47 "mmap(/dev/zero, MAP_SHARED, %uz) failed", size);
49 size);
50 p = NULL; 48 p = NULL;
51 } 49 }
52 50
53 if (close(fd) == -1) { 51 if (close(fd) == -1) {
54 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, "close() failed"); 52 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, "close() failed");
70 68
71 id = shmget(IPC_PRIVATE, size, (SHM_R|SHM_W|IPC_CREAT)); 69 id = shmget(IPC_PRIVATE, size, (SHM_R|SHM_W|IPC_CREAT));
72 70
73 if (id == -1) { 71 if (id == -1) {
74 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 72 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
75 "shmget(" SIZE_T_FMT ") failed", size); 73 "shmget(%uz) failed", size);
76 return NULL; 74 return NULL;
77 } 75 }
78 76
79 ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "shmget id: %d", id); 77 ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "shmget id: %d", id);
80 78