diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-25 00:52:29 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-25 00:52:29 +0000 |
commit | d9ec007e736152cd4e21e0d0d8b65e53b7f0d456 (patch) | |
tree | 519d08e800e192188b2db8945d4c2cc1438ab419 /ace/IPC_SAP.cpp | |
parent | 6b86c2b6ada1641ec1b10071b9d1e59447dcba30 (diff) | |
download | ATCD-d9ec007e736152cd4e21e0d0d8b65e53b7f0d456.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/IPC_SAP.cpp')
-rw-r--r-- | ace/IPC_SAP.cpp | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/ace/IPC_SAP.cpp b/ace/IPC_SAP.cpp index 0747ed7be7e..b8bee1b8c09 100644 --- a/ace/IPC_SAP.cpp +++ b/ace/IPC_SAP.cpp @@ -63,36 +63,34 @@ ACE_IPC_SAP::enable (int signum) const #if defined (SIGURG) case SIGURG: #if defined (F_SETOWN) - if (ACE_OS::fcntl (this->handle_, F_SETOWN, ACE_IPC_SAP::pid_) < 0) - return -1; + return ACE_OS::fcntl (this->handle_, F_SETOWN, ACE_IPC_SAP::pid_); #else return -1; #endif /* F_SETOWN */ - break; #endif /* SIGURG */ #if defined (SIGIO) // <== case SIGIO: #if defined (F_SETOWN) && defined (FASYNC) - if (ACE_OS::fcntl (this->handle_, F_SETOWN, ACE_IPC_SAP::pid_) == -1) - return -1; - if (ACE::set_flags (this->handle_, FASYNC) == -1) + if (ACE_OS::fcntl (this->handle_, F_SETOWN, ACE_IPC_SAP::pid_) == -1 || + ACE::set_flags (this->handle_, FASYNC) == -1) return -1; + else + return 0; #else return -1; #endif /* F_SETOWN && FASYNC */ -#else // <== - return -1; // <== #endif /* SIGIO <== */ - break; case ACE_NONBLOCK: if (ACE::set_flags (this->handle_, ACE_NONBLOCK) == ACE_INVALID_HANDLE) return -1; - break; + else + return 0; default: return -1; } #endif /* ! ACE_WIN32 && ! VXWORKS */ - return 0; + + /* NOTREACHED */ } // Restore the IPC_SAPet by turning off synchronous I/O or urgent @@ -122,9 +120,7 @@ ACE_IPC_SAP::disable (int signum) const #if defined (SIGURG) case SIGURG: #if defined (F_SETOWN) - if (ACE_OS::fcntl (this->handle_, F_SETOWN, 0) == -1) - return -1; - break; + return ACE_OS::fcntl (this->handle_, F_SETOWN, 0) #else return -1; #endif /* F_SETOWN */ @@ -132,16 +128,14 @@ ACE_IPC_SAP::disable (int signum) const #if defined (SIGIO) // <== case SIGIO: #if defined (F_SETOWN) && defined (FASYNC) - if (ACE_OS::fcntl (this->handle_, F_SETOWN, 0) == -1) - return -1; - if (ACE::clr_flags (this->handle_, FASYNC) == -1) + if (ACE_OS::fcntl (this->handle_, F_SETOWN, 0) == -1 || + ACE::clr_flags (this->handle_, FASYNC) == -1) return -1; - break; + else + return 0; #else return -1; #endif /* F_SETOWN && FASYNC */ -#else // <== - return -1; // <== #endif /* SIGIO <== */ case ACE_NONBLOCK: if (ACE::clr_flags (this->handle_, ACE_NONBLOCK) == -1) @@ -151,5 +145,6 @@ ACE_IPC_SAP::disable (int signum) const return -1; } #endif /* ! ACE_WIN32 && ! VXWORKS */ - return 0; + + /* NOTREACHED */ } |