diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-04-22 17:02:32 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-02 11:29:35 (GMT) |
commit | 1d965e189dfd5c9977565ca0c20224806aa7473d (patch) | |
tree | 746c3f36069ce9b32a5e6fd25a0f818934a1654b /src/corelib/kernel | |
parent | 557258e8f944f0003e9b71e5fe11fcb458db71d8 (diff) | |
download | Qt-1d965e189dfd5c9977565ca0c20224806aa7473d.zip Qt-1d965e189dfd5c9977565ca0c20224806aa7473d.tar.gz Qt-1d965e189dfd5c9977565ca0c20224806aa7473d.tar.bz2 |
Use the safe versions in these system calls I've just introduced.
Reviewed-By: ossi
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 161398e..0eeea04 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -49,6 +49,7 @@ #include "qeventdispatcher_unix_p.h" #include <private/qthread_p.h> #include <private/qcoreapplication_p.h> +#include <private/qcore_unix_p.h> #include <errno.h> #include <stdio.h> @@ -76,6 +77,7 @@ static void signalHandler(int sig) } +#ifdef Q_OS_INTEGRITY static void initThreadPipeFD(int fd) { int ret = fcntl(fd, F_SETFD, FD_CLOEXEC); @@ -90,7 +92,7 @@ static void initThreadPipeFD(int fd) if (ret == -1) perror("QEventDispatcherUNIXPrivate: Unable to set flags on thread pipe"); } - +#endif QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() { @@ -102,13 +104,13 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() // INTEGRITY doesn't like a "select" on pipes, so use socketpair instead if (socketpair(AF_INET, SOCK_STREAM, PF_INET, thread_pipe) == -1) perror("QEventDispatcherUNIXPrivate(): Unable to create socket pair"); -#else - if (pipe(thread_pipe) == -1) - perror("QEventDispatcherUNIXPrivate(): Unable to create thread pipe"); -#endif initThreadPipeFD(thread_pipe[0]); initThreadPipeFD(thread_pipe[1]); +#else + if (qt_safe_pipe(thread_pipe, O_NONBLOCK) == -1) + perror("QEventDispatcherUNIXPrivate(): Unable to create thread pipe"); +#endif sn_highest = -1; |