[前][次][番号順一覧][スレッド一覧]

ruby-changes:20277

From: ko1 <ko1@a...>
Date: Thu, 30 Jun 2011 19:11:54 +0900 (JST)
Subject: [ruby-changes:20277] ko1:r32325 (trunk): * thread_pthread.c (thread_timer): ignore unknown errno.

ko1	2011-06-30 19:11:45 +0900 (Thu, 30 Jun 2011)

  New Revision: 32325

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32325

  Log:
    * thread_pthread.c (thread_timer): ignore unknown errno.
      (we observed that select(2) was canceled by errno=514 on
      boron == Linux/Xen environment)

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32324)
+++ ChangeLog	(revision 32325)
@@ -1,3 +1,9 @@
+Thu Jun 30 19:09:19 2011  Koichi Sasada  <ko1@a...>
+
+	* thread_pthread.c (thread_timer): ignore unknown errno.
+	 (we observed that select(2) was canceled by errno=514 on
+	  boron == Linux/Xen environment)
+
 Thu Jun 30 17:33:25 2011  Koichi Sasada  <ko1@a...>
 
 	* ext/objspace/objspace.c (ObjectSpace.count_tdata_objects): 
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 32324)
+++ thread_pthread.c	(revision 32325)
@@ -1104,12 +1104,15 @@
 	    consume_communication_pipe();
 	}
 	else { /* result < 0 */
-	    if (errno == EINTR) {
-		/* interrupted. ignore */
-	    }
-	    else {
-		rb_async_bug_errno("thread_timer: select", errno);
-	    }
+	  switch (errno) {
+	    case EBADF:
+	    case EINVAL:
+	    case ENOMEM: /* from Linux man */
+	    case EFAULT: /* from FreeBSD man */
+	      rb_async_bug_errno("thread_timer: select", errno);
+	    default:
+	      /* ignore */;
+	  }
 	}
     }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]