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

ruby-changes:16565

From: akr <ko1@a...>
Date: Tue, 6 Jul 2010 22:59:27 +0900 (JST)
Subject: [ruby-changes:16565] Ruby:r28557 (trunk): * io.c (nogvl_copy_stream_sendfile): jump to retry_sendfile directly

akr	2010-07-06 22:59:12 +0900 (Tue, 06 Jul 2010)

  New Revision: 28557

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

  Log:
    * io.c (nogvl_copy_stream_sendfile): jump to retry_sendfile directly
      to avoid select() on a socket which TCP state is CLOSED.
      patch by Eric Wong.  [ruby-core:31053]

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28556)
+++ ChangeLog	(revision 28557)
@@ -1,3 +1,9 @@
+Tue Jul  6 22:57:21 2010  Tanaka Akira  <akr@f...>
+
+	* io.c (nogvl_copy_stream_sendfile): jump to retry_sendfile directly
+	  to avoid select() on a socket which TCP state is CLOSED.
+	  patch by Eric Wong.  [ruby-core:31053]
+
 Tue Jul  6 21:45:34 2010  NAKAMURA Usaku  <usa@r...>
 
 	* io/console/console.c (winsize_row): should return actual screen
Index: io.c
===================================================================
--- io.c	(revision 28556)
+++ io.c	(revision 28557)
@@ -8147,8 +8147,7 @@
         stp->total += ss;
         copy_length -= ss;
         if (0 < copy_length) {
-            ss = -1;
-            errno = EAGAIN;
+            goto retry_sendfile;
         }
     }
     if (ss == -1) {

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

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