about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-07-06 18:32:39 -0700
committerEric Wong <normalperson@yhbt.net>2011-07-06 18:32:39 -0700
commit8e1a53f99a752d8ccba324560a9e52bf6e80680d (patch)
treee927a09ba14e23c602adfc5ee7307ff9b5895457
parente720827b48c3318627d1471ad4ec90d6166520fd (diff)
downloadkgio-8e1a53f99a752d8ccba324560a9e52bf6e80680d.tar.gz
my_fileno() may change errno on some Rubies
-rw-r--r--ext/kgio/accept.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/kgio/accept.c b/ext/kgio/accept.c
index 98d7707..1a125ca 100644
--- a/ext/kgio/accept.c
+++ b/ext/kgio/accept.c
@@ -204,6 +204,7 @@ retry:
                         if (force_nonblock)
                                 return Qnil;
                         a->fd = my_fileno(a->accept_io);
+                        errno = EAGAIN;
                         set_blocking_or_block(a->fd);
 #ifdef ECONNABORTED
                 case ECONNABORTED: