diff options
author | Jose <jose@zeroc.com> | 2012-12-27 23:20:00 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-12-27 23:20:00 +0100 |
commit | 05fe914f6f78c8f7bb3f4530d68b2926bf2cea51 (patch) | |
tree | f171ab75496f6dc5e5b2cec5e92f8a46049e9a1d /cpp/src/Ice/Service.cpp | |
parent | Fixed (ICE-5161) - Strange xxx ruby library names (diff) | |
download | ice-05fe914f6f78c8f7bb3f4530d68b2926bf2cea51.tar.bz2 ice-05fe914f6f78c8f7bb3f4530d68b2926bf2cea51.tar.xz ice-05fe914f6f78c8f7bb3f4530d68b2926bf2cea51.zip |
Fixed warnings related to ICE-5157
Diffstat (limited to 'cpp/src/Ice/Service.cpp')
-rw-r--r-- | cpp/src/Ice/Service.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index df2681fb02b..d5f77ada648 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -1709,15 +1709,33 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa int fd; fd = open("/dev/null", O_RDWR); assert(fd == 0); + if(fd != 0) + { + SyscallException ex(__FILE__, __LINE__); + ex.error = IceInternal::getSystemErrno(); + throw ex; + } if(stdOut.empty()) { fd = dup2(0, 1); assert(fd == 1); + if(fd != 1) + { + SyscallException ex(__FILE__, __LINE__); + ex.error = IceInternal::getSystemErrno(); + throw ex; + } } if(stdErr.empty()) { fd = dup2(1, 2); assert(fd == 2); + if(fd != 2) + { + SyscallException ex(__FILE__, __LINE__); + ex.error = IceInternal::getSystemErrno(); + throw ex; + } } } |