diff options
author | Steve Huston <shuston@riverace.com> | 2010-09-24 14:54:19 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2010-09-24 14:54:19 +0000 |
commit | ba1c89369ff3455b65602210b3522e25cead2bf8 (patch) | |
tree | 6b36dd46cbe050bcdeb02c945b16714165ae006e /ACE/ace/Pipe.cpp | |
parent | a21a79d9e97cb44080525e7c520f5917b29d54f7 (diff) | |
download | ATCD-ba1c89369ff3455b65602210b3522e25cead2bf8.tar.gz |
ChangeLogTag:Fri Sep 24 14:52:44 UTC 2010 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/ace/Pipe.cpp')
-rw-r--r-- | ACE/ace/Pipe.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/ACE/ace/Pipe.cpp b/ACE/ace/Pipe.cpp index 397f86b5f02..ff3914702d9 100644 --- a/ACE/ace/Pipe.cpp +++ b/ACE/ace/Pipe.cpp @@ -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 |