diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-11 07:18:29 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-11 07:18:29 +0000 |
commit | 0f5ca06a4aeb42c19348c66cc8f0ef59b3670272 (patch) | |
tree | 3e89eb7dd7f57f4b835420f818421d31cd75a957 | |
parent | 5e3081b928ba5bc3ebb741549980311abfbbe15d (diff) | |
download | ruby-0f5ca06a4aeb42c19348c66cc8f0ef59b3670272.tar.gz ruby-0f5ca06a4aeb42c19348c66cc8f0ef59b3670272.tar.xz ruby-0f5ca06a4aeb42c19348c66cc8f0ef59b3670272.zip |
* win32/win32.c (rb_w32_accept, rb_w32_socket, rb_w32_socketpair):
prohibit inheritance of sockets, too. [experimental]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | win32/win32.c | 8 |
2 files changed, 11 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Fri Jul 11 16:16:43 2008 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (rb_w32_accept, rb_w32_socket, rb_w32_socketpair): + prohibit inheritance of sockets, too. [experimental] + Fri Jul 11 14:39:49 2008 NAKAMURA Usaku <usa@ruby-lang.org> * win32/win32.c (CreateChild): the measures for Vista is no longer @@ -36,9 +41,11 @@ Thu Jul 10 21:15:49 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp> * test/win32ole/test_win32ole_method.rb: ditto. Thu Jul 10 19:38:35 2008 wanabe <s.wanabe@gmail.com> + * test/ruby/envutil.rb (assert_normal_exit): r17993 revert. Thu Jul 10 18:29:41 2008 wanabe <s.wanabe@gmail.com> + * test/ruby/envutil.rb (assert_normal_exit): finish writing script before spawn("ruby") to avoid blocking in win32. diff --git a/win32/win32.c b/win32/win32.c index f49174de5..d3ba3fa07 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2269,7 +2269,7 @@ rb_w32_accept(int s, struct sockaddr *addr, int *addrlen) s = -1; } else { - s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY); + s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY|O_NOINHERIT); } }); return s; @@ -2568,7 +2568,7 @@ rb_w32_socket(int af, int type, int protocol) fd = -1; } else { - fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY); + fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY|O_NOINHERIT); } }); return fd; @@ -2788,8 +2788,8 @@ rb_w32_socketpair(int af, int type, int protocol, int *sv) if (socketpair_internal(af, type, protocol, pair) < 0) return -1; - sv[0] = rb_w32_open_osfhandle(pair[0], O_RDWR|O_BINARY); - sv[1] = rb_w32_open_osfhandle(pair[1], O_RDWR|O_BINARY); + sv[0] = rb_w32_open_osfhandle(pair[0], O_RDWR|O_BINARY|O_NOINHERIT); + sv[1] = rb_w32_open_osfhandle(pair[1], O_RDWR|O_BINARY|O_NOINHERIT); return 0; } |