summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authoroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-29 18:16:23 +0000
committeroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-29 18:16:23 +0000
commita71aa07fa23ff894813e3329f1bd6e9c3f63e760 (patch)
tree51289be9ed5985157fe27a2939c74cba5b01620c /TAO
parente7a21c10ac1fb31b424e482b21675ef8d6304d16 (diff)
downloadATCD-a71aa07fa23ff894813e3329f1bd6e9c3f63e760.tar.gz
ChangeLog tag Tue May 29 13:01:54 2001 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a20
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp6
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp5
-rw-r--r--TAO/tao/Strategies/SHMIOP_Acceptor.cpp5
-rw-r--r--TAO/tao/Strategies/UIOP_Acceptor.cpp5
5 files changed, 41 insertions, 0 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index c23064381e8..78482fc13e3 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,23 @@
+Tue May 29 13:01:54 2001 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * tao/Strategies/SHMIOP_Acceptor.cpp (open_i):
+ * tao/Strategies/UIOP_Acceptor.cpp (open_i):
+ * tao/IIOP_Acceptor.cpp (open_i):
+
+ In order to fix bug 902, I added the enabling of CLOSE_ON_EXEC
+ for the acceptor sockets used by the above protocols. This is
+ part 1 (of 3) of the solution.
+
+ * orbsvcs/ImplRepo_Service/ImplRepo_i.cpp (start_server_i):
+
+ Since win32 does not support CLOSE_ON_EXEC for individual files, a
+ slightly more heavy handed solution is needed when spawning child
+ processes and guarantee the ImplRepo server can be restarted if
+ necessary. This does not address the problem of identifying which
+ processes are "owned" by a newly restarted impl repo though. This
+ is part 2 (of 3) of the solution. Part 3 is discussed in $ACE_ROOT/
+ ChangeLog.
+
Tue May 29 11:19:29 2001 Jeff Parsons <parsons@cs.wustl.edu>
* orbsvcs/IFR_Service/ifr_adding_visitor.cpp:
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp
index 4827c68a804..06cabeb3d13 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp
@@ -288,6 +288,12 @@ ImplRepo_i::start_server_i (const char *server,
proc_opts.command_line (startup.c_str ());
proc_opts.working_directory (working.c_str ());
+ proc_opts.handle_inheritence (0);
+ // Win32 does not support the CLOSE_ON_EXEC semantics for sockets
+ // the way unix does, so in order to avoid having the child process
+ // hold the listen socket open, we force the child to inherit no
+ // handles. This includes stdin, stdout, logs, etc.
+
for (size_t i = 0; i < environment.length(); ++i)
proc_opts.setenv (environment[i].name.in (), environment[i].value.in ());
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index 1c1f16cc81f..023414f0098 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -505,6 +505,11 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr)
for (size_t j = 0; j < this->endpoint_count_; ++j)
this->addrs_[j].set_port_number (port, 1);
+ (void) this->base_acceptor_.acceptor().enable (ACE_CLOEXEC);
+ // This avoids having child processes acquire the listen socket thereby
+ // denying the server the opportunity to restart on a well-known endpoint.
+ // This does not affect the aberrent behavior on Win32 platforms.
+
if (TAO_debug_level > 5)
{
for (size_t i = 0; i < this->endpoint_count_; ++i)
diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
index b8f1604801f..170a6b353b0 100644
--- a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
@@ -318,6 +318,11 @@ TAO_SHMIOP_Acceptor::open_i (TAO_ORB_Core* orb_core)
}
this->host_ = tmp_host;
+ (void) this->base_acceptor_.acceptor().enable (ACE_CLOEXEC);
+ // This avoids having child processes acquire the listen socket thereby
+ // denying the server the opportunity to restart on a well-known endpoint.
+ // This does not affect the aberrent behavior on Win32 platforms.
+
if (TAO_debug_level > 5)
{
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/tao/Strategies/UIOP_Acceptor.cpp b/TAO/tao/Strategies/UIOP_Acceptor.cpp
index a41f51b7133..cbb5592d386 100644
--- a/TAO/tao/Strategies/UIOP_Acceptor.cpp
+++ b/TAO/tao/Strategies/UIOP_Acceptor.cpp
@@ -312,6 +312,11 @@ TAO_UIOP_Acceptor::open_i (const char *rendezvous)
return -1;
}
+ (void) this->base_acceptor_.acceptor().enable (ACE_CLOEXEC);
+ // This avoids having child processes acquire the listen socket thereby
+ // denying the server the opportunity to restart on a well-known endpoint.
+ // This does not affect the aberrent behavior on Win32 platforms.
+
// @@ If Profile creation is slow we may need to cache the
// rendezvous point here