comparison src/event/modules/ngx_epoll_module.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 4b2dafa26fe2
children 6f8b0dc0f8dd
comparison
equal deleted inserted replaced
9:77eee314ddbd 10:46833bd150cb
230 230
231 ee.events = event | flags; 231 ee.events = event | flags;
232 ee.data.ptr = (void *) ((uintptr_t) c | ev->instance); 232 ee.data.ptr = (void *) ((uintptr_t) c | ev->instance);
233 233
234 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0, 234 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
235 "epoll add event: fd:%d op:%d ev:%08X", 235 "epoll add event: fd:%d op:%d ev:%08XD",
236 c->fd, op, ee.events); 236 c->fd, op, ee.events);
237 237
238 if (epoll_ctl(ep, op, c->fd, &ee) == -1) { 238 if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
239 ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno, 239 ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
240 "epoll_ctl(%d, %d) failed", op, c->fd); 240 "epoll_ctl(%d, %d) failed", op, c->fd);
289 ee.events = 0; 289 ee.events = 0;
290 ee.data.ptr = NULL; 290 ee.data.ptr = NULL;
291 } 291 }
292 292
293 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0, 293 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
294 "epoll del event: fd:%d op:%d ev:%08X", 294 "epoll del event: fd:%d op:%d ev:%08XD",
295 c->fd, op, ee.events); 295 c->fd, op, ee.events);
296 296
297 if (epoll_ctl(ep, op, c->fd, &ee) == -1) { 297 if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
298 ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno, 298 ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
299 "epoll_ctl(%d, %d) failed", op, c->fd); 299 "epoll_ctl(%d, %d) failed", op, c->fd);
312 312
313 ee.events = EPOLLIN|EPOLLOUT|EPOLLET; 313 ee.events = EPOLLIN|EPOLLOUT|EPOLLET;
314 ee.data.ptr = (void *) ((uintptr_t) c | c->read->instance); 314 ee.data.ptr = (void *) ((uintptr_t) c | c->read->instance);
315 315
316 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, 316 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
317 "epoll add connection: fd:%d ev:%08X", c->fd, ee.events); 317 "epoll add connection: fd:%d ev:%08XD", c->fd, ee.events);
318 318
319 if (epoll_ctl(ep, EPOLL_CTL_ADD, c->fd, &ee) == -1) { 319 if (epoll_ctl(ep, EPOLL_CTL_ADD, c->fd, &ee) == -1) {
320 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, 320 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno,
321 "epoll_ctl(EPOLL_CTL_ADD, %d) failed", c->fd); 321 "epoll_ctl(EPOLL_CTL_ADD, %d) failed", c->fd);
322 return NGX_ERROR; 322 return NGX_ERROR;
511 * the stale event from a file descriptor 511 * the stale event from a file descriptor
512 * that was just closed in this iteration 512 * that was just closed in this iteration
513 */ 513 */
514 514
515 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 515 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
516 "epoll: stale event " PTR_FMT, c); 516 "epoll: stale event %p", c);
517 continue; 517 continue;
518 } 518 }
519 519
520 #if (NGX_DEBUG0) 520 #if (NGX_DEBUG0)
521 log = c->log ? c->log : cycle->log; 521 log = c->log ? c->log : cycle->log;
522 #endif 522 #endif
523 523
524 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, log, 0, 524 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, log, 0,
525 "epoll: fd:%d ev:%04X d:" PTR_FMT, 525 "epoll: fd:%d ev:%04XD d:%p",
526 c->fd, event_list[i].events, event_list[i].data); 526 c->fd, event_list[i].events, event_list[i].data);
527 527
528 if (event_list[i].events & (EPOLLERR|EPOLLHUP)) { 528 if (event_list[i].events & (EPOLLERR|EPOLLHUP)) {
529 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, log, 0, 529 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, log, 0,
530 "epoll_wait() error on fd:%d ev:%04X", 530 "epoll_wait() error on fd:%d ev:%04XD",
531 c->fd, event_list[i].events); 531 c->fd, event_list[i].events);
532 } 532 }
533 533
534 if (event_list[i].events & ~(EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP)) { 534 if (event_list[i].events & ~(EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP)) {
535 ngx_log_error(NGX_LOG_ALERT, log, 0, 535 ngx_log_error(NGX_LOG_ALERT, log, 0,
536 "strange epoll_wait() events fd:%d ev:%04X", 536 "strange epoll_wait() events fd:%d ev:%04XD",
537 c->fd, event_list[i].events); 537 c->fd, event_list[i].events);
538 } 538 }
539 539
540 wev = c->write; 540 wev = c->write;
541 541