2002-08-07 00:39:45 +08:00
|
|
|
|
|
|
|
int ngx_posix_aio_process_events(ngx_log_t *log)
|
|
|
|
{
|
|
|
|
unmask signal
|
|
|
|
|
2002-08-24 00:14:30 +08:00
|
|
|
listen via SIGIO;
|
2002-08-07 00:39:45 +08:00
|
|
|
|
2002-08-24 00:14:30 +08:00
|
|
|
/* BUG: SIGIO can be delivered before aio_*() */
|
|
|
|
|
|
|
|
aio_suspend()/aiowait()/aio_waitcomplete() with timeout
|
2002-08-07 00:39:45 +08:00
|
|
|
|
|
|
|
mask signal
|
|
|
|
|
|
|
|
if (ngx_socket_errno == NGX_EINTR)
|
|
|
|
look listen
|
|
|
|
select()/accept() nb listen sockets
|
|
|
|
else
|
|
|
|
aio
|
|
|
|
}
|
|
|
|
|
|
|
|
int ngx_posix_aio_process_events(ngx_log_t *log)
|
|
|
|
{
|
|
|
|
unmask signal
|
|
|
|
|
2002-08-24 00:14:30 +08:00
|
|
|
/* BUG: AIO signal can be delivered before select() */
|
2002-08-07 00:39:45 +08:00
|
|
|
|
|
|
|
select(listen);
|
|
|
|
|
|
|
|
mask signal
|
|
|
|
|
|
|
|
if (ngx_socket_errno == NGX_EINTR)
|
|
|
|
look ready array
|
|
|
|
}
|
|
|
|
|
|
|
|
void aio_sig_handler(int signo, siginfo_t *siginfo, void *context)
|
|
|
|
{
|
|
|
|
push siginfo->si_value.sival_ptr
|
|
|
|
}
|
|
|
|
|