summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qsharedmemory_unix.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-04-22 17:30:51 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-02 13:29:35 +0200
commit29302d2429ed81f4396155383b602e7bde4edd3b (patch)
tree434cccb049b37e0659fbc8d312bed3eaa9fc943d /src/corelib/kernel/qsharedmemory_unix.cpp
parentc5f83fbd89d6bb950fb012c285879f6c88b5bdf3 (diff)
Port most uses of ::open and QT_OPEN to the safe version.
This ensures that we're calling the open64 version of this function as well as handling the O_CLOEXEC flag and EINTR errors. Reviewed-By: João Abecasis
Diffstat (limited to 'src/corelib/kernel/qsharedmemory_unix.cpp')
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index 5299972da2..04739ff8d4 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -59,6 +59,8 @@
#include <fcntl.h>
#include <unistd.h>
+#include "private/qcore_unix_p.h"
+
QT_BEGIN_NAMESPACE
QSharedMemoryPrivate::QSharedMemoryPrivate()
@@ -153,7 +155,7 @@ int QSharedMemoryPrivate::createUnixKeyFile(const QString &fileName)
if (QFile::exists(fileName))
return 0;
- int fd = open(QFile::encodeName(fileName).constData(),
+ int fd = qt_safe_open(QFile::encodeName(fileName).constData(),
O_EXCL | O_CREAT | O_RDWR, 0640);
if (-1 == fd) {
if (errno == EEXIST)