ruby-changes:21592
From: akr <ko1@a...>
Date: Sat, 5 Nov 2011 19:13:10 +0900 (JST)
Subject: [ruby-changes:21592] akr:r33641 (trunk): * io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if
akr 2011-11-05 19:13:00 +0900 (Sat, 05 Nov 2011) New Revision: 33641 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33641 Log: * io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC). Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33640) +++ ChangeLog (revision 33641) @@ -1,3 +1,8 @@ +Sat Nov 5 19:11:50 2011 Tanaka Akira <akr@f...> + + * io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if + fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC). + Sat Nov 5 18:05:12 2011 Tanaka Akira <akr@f...> * ext/socket/socket.c (rsock_socketpair0): refactored. Index: io.c =================================================================== --- io.c (revision 33640) +++ io.c (revision 33641) @@ -297,8 +297,10 @@ } /* F_DUPFD_CLOEXEC is available since Linux 2.6.24. Linux 2.6.18 fails with EINVAL */ if (errno == EINVAL) { - try_dupfd_cloexec = 0; ret = fcntl(fd, F_DUPFD, minfd); + if (ret != -1) { + try_dupfd_cloexec = 0; + } } } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/