summaryrefslogtreecommitdiff
path: root/ACE/ace/Pipe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Pipe.cpp')
-rw-r--r--ACE/ace/Pipe.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/ACE/ace/Pipe.cpp b/ACE/ace/Pipe.cpp
index 7e187f285a0..ff3914702d9 100644
--- a/ACE/ace/Pipe.cpp
+++ b/ACE/ace/Pipe.cpp
@@ -18,7 +18,7 @@
#include "ace/Pipe.inl"
#endif /* __ACE_INLINE__ */
-ACE_RCSID(ace, Pipe, "$Id$")
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -39,7 +39,7 @@ ACE_Pipe::open (int buffer_size)
{
ACE_TRACE ("ACE_Pipe::open");
-#if defined (ACE_LACKS_SOCKETPAIR) || defined (__Lynx__)
+#if defined (ACE_LACKS_SOCKETPAIR)
ACE_INET_Addr my_addr;
ACE_SOCK_Acceptor acceptor;
ACE_SOCK_Connector connector;
@@ -254,21 +254,20 @@ ACE_Pipe::close (void)
{
ACE_TRACE ("ACE_Pipe::close");
- int result = 0;
-
- // Note that the following will work even if we aren't closing down
- // sockets because <ACE_OS::closesocket> will just call <::close> in
- // that case!
-
- if (this->handles_[0] != ACE_INVALID_HANDLE)
- result = ACE_OS::closesocket (this->handles_[0]);
- this->handles_[0] = ACE_INVALID_HANDLE;
+ int result = this->close_read ();
+ result |= this->close_write ();
+ return result;
+}
- if (this->handles_[1] != ACE_INVALID_HANDLE)
- result |= ACE_OS::closesocket (this->handles_[1]);
- this->handles_[1] = ACE_INVALID_HANDLE;
+int
+ACE_Pipe::close_read (void)
+{
+ return this->close_handle (0);
+}
- return result;
+int ACE_Pipe::close_write (void)
+{
+ return this->close_handle (1);
}
// Send N char *ptrs and int lengths. Note that the char *'s precede