Permalink
Browse files

Migrate from select to rb_thread_fd_select

  • Loading branch information...
Pikrass committed Jan 27, 2014
1 parent ea4712f commit 0f68ea7dfa6ea3a25b619aa8ba49c2826eb33cbb
Showing with 4 additions and 8 deletions.
  1. +0 −4 TODO
  2. +4 −4 ext/fcgi/fcgi.c
4 TODO

This file was deleted.

Oops, something went wrong.
@@ -78,7 +78,7 @@ static VALUE fcgi_s_accept(VALUE self)
{
int status;
FCGX_Request *req;
fd_set readfds;
rb_fdset_t readfds;
req = ALLOC(FCGX_Request);
@@ -88,9 +88,9 @@ static VALUE fcgi_s_accept(VALUE self)
return Qnil;
}
FD_ZERO(&readfds);
FD_SET(req->listen_sock, &readfds);
if (select(req->listen_sock+1, &readfds, NULL, NULL, NULL) < 1) {
rb_fd_init(&readfds);
rb_fd_set(req->listen_sock, &readfds);
if (rb_thread_fd_select(readfds.maxfd, &readfds, NULL, NULL, NULL) < 1) {
return Qnil;
}

0 comments on commit 0f68ea7

Please sign in to comment.