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

ruby-changes:14382

From: usa <ko1@a...>
Date: Thu, 31 Dec 2009 14:22:27 +0900 (JST)
Subject: [ruby-changes:14382] Ruby:r26212 (trunk): * process.c (save_redirect_fd): consider EBADF that the fd is not used.

usa	2009-12-31 14:22:11 +0900 (Thu, 31 Dec 2009)

  New Revision: 26212

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

  Log:
    * process.c (save_redirect_fd): consider EBADF that the fd is not used.
      [ruby-dev:39938]

  Modified files:
    trunk/ChangeLog
    trunk/process.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26211)
+++ ChangeLog	(revision 26212)
@@ -1,3 +1,8 @@
+Thu Dec 31 14:20:11 2009  NAKAMURA Usaku  <usa@r...>
+
+	* process.c (save_redirect_fd): consider EBADF that the fd is not used.
+	  [ruby-dev:39938]
+
 Thu Dec 31 06:03:48 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/socket/raddrinfo.c (addrinfo_type): typed.
Index: process.c
===================================================================
--- process.c	(revision 26211)
+++ process.c	(revision 26212)
@@ -1863,6 +1863,8 @@
         VALUE newary;
         int save_fd = redirect_dup(fd);
         if (save_fd == -1) {
+            if (errno == EBADF)
+                return 0;
             ERRMSG("dup");
             return -1;
         }

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

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