mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/init.c (rsock_socket): set close-on-exec flag when
SOCK_CLOEXEC is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8731a38bff
commit
a0b22b1a39
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Nov 3 22:12:41 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||||
|
|
||||||
|
* ext/socket/init.c (rsock_socket): set close-on-exec flag when
|
||||||
|
SOCK_CLOEXEC is not available.
|
||||||
|
|
||||||
Thu Nov 03 08:36:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
Thu Nov 03 08:36:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
||||||
|
|
||||||
* test/openssl/test_engine.rb: call Engine::cleanup on exit.
|
* test/openssl/test_engine.rb: call Engine::cleanup on exit.
|
||||||
|
|
|
@ -270,8 +270,16 @@ rsock_socket(int domain, int type0, int proto)
|
||||||
fd = socket(domain, type, proto);
|
fd = socket(domain, type, proto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef SOCK_CLOEXEC
|
||||||
if (0 <= fd)
|
if (0 <= fd)
|
||||||
rb_update_max_fd(fd);
|
if (try_sock_cloexec)
|
||||||
|
rb_update_max_fd(fd);
|
||||||
|
else
|
||||||
|
rb_fd_fix_cloexec(fd);
|
||||||
|
#else
|
||||||
|
if (0 <= fd)
|
||||||
|
rb_fd_fix_cloexec(fd);
|
||||||
|
#endif
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue