nginx-0.0.1-2003-01-15-10:02:27 import

This commit is contained in:
Igor Sysoev
2003-01-15 07:02:27 +00:00
parent e79c6ac7b2
commit ad22e01112
16 changed files with 142 additions and 69 deletions

View File

@@ -206,10 +206,13 @@ int ngx_devpoll_process_events(ngx_log_t *log)
ngx_log_debug(log, "devpoll timer: %d" _ timer);
#endif
n = nchanges * sizeof(struct pollfd);
if (write(dp, change_list, n) != n) {
ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, "write(/dev/poll) failed");
return NGX_ERROR;
if (nchanges) {
n = nchanges * sizeof(struct pollfd);
if (write(dp, change_list, n) != n) {
ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
"write(/dev/poll) failed");
return NGX_ERROR;
}
}
dvp.dp_fds = event_list;