summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-06 14:46:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-06 14:46:29 +0100
commit535b1dadc202ecb65510e846fe21652a84f3c07d (patch)
tree762be66b15f637733caf3f6e503155b99e88c7da /sal
parentebb4ac785f9d5278bc22405c0a3dc1c419af690d (diff)
coverity#1190345 log failure to set CLOEXEC flag
Change-Id: Ia1678200393db0165711d4027f92a8be6b7f4ca5
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/profile.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx
index 952e5e22ad92..402bf9cfc7fd 100644
--- a/sal/osl/unx/profile.cxx
+++ b/sal/osl/unx/profile.cxx
@@ -25,6 +25,7 @@
#include <osl/process.h>
#include <osl/thread.h>
#include <rtl/alloc.h>
+#include <sal/log.hxx>
#define LINES_INI 32
#define LINES_ADD 10
@@ -1221,7 +1222,10 @@ static osl_TFile* openFileImpl(const sal_Char* pszFilename, oslProfileOption Pro
if ((Flags = fcntl(pFile->m_Handle, F_GETFD, 0)) != -1)
{
Flags |= FD_CLOEXEC;
- fcntl(pFile->m_Handle, F_SETFD, Flags);
+ int e = fcntl(pFile->m_Handle, F_SETFD, Flags);
+ SAL_INFO_IF(
+ e != 0, "sal.osl",
+ "fcntl to set FD_CLOEXEC failed for " << pszFilename);
}
pFile->m_pWriteBuf=0;