Mercurial > hg > nginx
comparison src/event/ngx_event_accept.c @ 3:34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 20 Aug 2002 14:48:28 +0000 |
parents | 4eff17414a43 |
children | 669801705ab1 |
comparison
equal
deleted
inserted
replaced
2:ffffe1499bce | 3:34a521b1a148 |
---|---|
36 return 0; | 36 return 0; |
37 } | 37 } |
38 | 38 |
39 ngx_log_debug(ev->log, "ngx_event_accept: accepted socket: %d" _ s); | 39 ngx_log_debug(ev->log, "ngx_event_accept: accepted socket: %d" _ s); |
40 | 40 |
41 #if !(HAVE_INHERITED_NONBLOCK) | |
42 if (ngx_nonblocking(s) == -1) | |
43 ngx_log_error(NGX_LOG_ERR, log, ngx_socket_errno, | |
44 ngx_nonblocking_n "failed"); | |
45 #endif | |
46 | |
41 ngx_memzero(&ngx_read_events[s], sizeof(ngx_event_t)); | 47 ngx_memzero(&ngx_read_events[s], sizeof(ngx_event_t)); |
42 ngx_memzero(&ngx_write_events[s], sizeof(ngx_event_t)); | 48 ngx_memzero(&ngx_write_events[s], sizeof(ngx_event_t)); |
43 ngx_memzero(&ngx_connections[s], sizeof(ngx_connection_t)); | 49 ngx_memzero(&ngx_connections[s], sizeof(ngx_connection_t)); |
44 | 50 |
45 ngx_read_events[s].data = ngx_write_events[s].data | 51 ngx_read_events[s].data = ngx_write_events[s].data |
67 #if (HAVE_DEFERRED_ACCEPT) | 73 #if (HAVE_DEFERRED_ACCEPT) |
68 if (ev->accept_filter) | 74 if (ev->accept_filter) |
69 ngx_read_events[s].ready = 1; | 75 ngx_read_events[s].ready = 1; |
70 #endif | 76 #endif |
71 | 77 |
72 cn->server->handler(&ngx_connections[s]); | 78 cn->handler(&ngx_connections[s]); |
73 | 79 |
74 #if (HAVE_KQUEUE) | 80 #if (HAVE_KQUEUE) |
75 #if !(USE_KQUEUE) | 81 #if !(USE_KQUEUE) |
76 if (ngx_event_type == NGX_KQUEUE_EVENT) | 82 if (ngx_event_type == NGX_KQUEUE_EVENT) |
77 #endif | 83 #endif |