1.0.22.18: select() and EAGAIN
authorGabor Melis <mega@hotpop.com>
Fri, 14 Nov 2008 14:07:46 +0000 (14:07 +0000)
committerGabor Melis <mega@hotpop.com>
Fri, 14 Nov 2008 14:07:46 +0000 (14:07 +0000)
On at least x86 linux 2.6.26 select() can return EAGAIN under load. I
guess this is what the commit message of 1.0.21.8 refers to as "what
happens in the wild" as EAGAIN is not mentioned in the select man
page.

src/code/serve-event.lisp
tools-for-build/grovel-headers.c
version.lisp-expr

index 00e3dec..2046161 100644 (file)
@@ -277,11 +277,12 @@ Shared between all threads, unless locally bound. EXPERIMENTAL.")
                (case err
                  (#.sb!unix:ebadf
                   (handler-descriptors-error))
-                 (#.sb!unix:eintr
+                 ((#.sb!unix:eintr #.sb!unix:eagain)
                   t)
                  (otherwise
                   (with-simple-restart (continue "Ignore failure and continue.")
-                    (simple-perror "Unix system call select() failed" :errno err))))
+                    (simple-perror "Unix system call select() failed"
+                                   :errno err))))
                #!+win32
                (handler-descriptors-error))
               ((plusp value)
index 56069ae..fb97cfc 100644 (file)
@@ -209,6 +209,7 @@ main(int argc, char *argv[])
     defconstant("enoent", ENOENT);
     defconstant("eexist", EEXIST);
     defconstant("eintr", EINTR);
+    defconstant("eagain", EAGAIN);
 
     defconstant("s-ifmt",  S_IFMT);
     defconstant("s-ifdir", S_IFDIR);
@@ -308,6 +309,7 @@ main(int argc, char *argv[])
     deferrno("ebadf", EBADF);
     deferrno("enoent", ENOENT);
     deferrno("eintr", EINTR);
+    deferrno("eagain", EAGAIN);
     deferrno("eio", EIO);
     deferrno("eexist", EEXIST);
     deferrno("eloop", ELOOP);
index d68a864..4101747 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.22.17"
+"1.0.22.18"