8000 merge revision(s) 45084: [Backport #9547] · github/ruby@f577abf · GitHub
[go: up one dir, main page]

Skip to content

Commit f577abf

Browse files
committed
merge revision(s) 45084: [Backport ruby#9547]
* ext/socket/init.c (wait_connectable): break if the socket is writable to avoid infinite loops on FreeBSD and other platforms which conforms to SUSv3. This problem cannot be reproduced with loopback interfaces, so it's hard to write test code. rsock_connect() and wait_connectable() are overly complicated, so they should be refactored, but I commit this fix as a workaround for the release of Ruby 1.9.3 scheduled on Feb 24. [ruby-core:60940] [Bug ruby#9547] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 8a059b4 commit f577abf

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Sat Feb 22 18:55:08 2014 Shugo Maeda <shugo@ruby-lang.org>
2+
3+
* ext/socket/init.c (wait_connectable): break if the socket is
4+
writable to avoid infinite loops on FreeBSD and other platforms
5+
which conforms to SUSv3. This problem cannot be reproduced with
6+
loopback interfaces, so it's hard to write test code.
7+
rsock_connect() and wait_connectable() are overly complicated, so
8+
they should be refactored, but I commit this fix as a workaround
9+
for the release of Ruby 1.9.3 scheduled on Feb 24.
10+
[ruby-core:60940] [Bug #9547]
11+
112
Sat Feb 22 18:48:57 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
213

314
* class.c (rb_mod_init_copy): do nothing if copying self.

ext/socket/init.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,12 @@ wait_connectable(int fd)
323323
*/
324324
if (ret < 0)
325325
break;
326-
if (sockerr == 0)
327-
continue; /* workaround for winsock */
326+
if (sockerr == 0) {
327+
if (revents & RB_WAITFD_OUT)
328+
break;
329+
else
330+
continue; /* workaround for winsock */
331+
}
328332

329333
/* BSD and Linux use sockerr. */
330334
errno = sockerr;

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.1.1"
22
#define RUBY_RELEASE_DATE "2014-02-22"
3-
#define RUBY_PATCHLEVEL 72
3+
#define RUBY_PATCHLEVEL 73
44

55
#define RUBY_RELEASE_YEAR 2014
66
#define RUBY_RELEASE_MONTH 2

0 commit comments

Comments
 (0)
0