[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kioslave/thumbnail
From: Dirk Mueller <mueller () kde ! org>
Date: 2003-07-21 23:08:07
[Download RAW message or body]
CVS commit by mueller:
ignore EINTR in select(). Thanks for the patch.
CCMAIL: 44098-done@bugs.kde.org
M +6 -3 gscreator.cpp 1.17
--- kdebase/kioslave/thumbnail/gscreator.cpp #1.16:1.17
@@ -64,4 +64,5 @@
#include <sys/wait.h>
#include <fcntl.h>
+#include <errno.h>
#include <qfile.h>
@@ -233,6 +234,8 @@ bool GSCreator::create(const QString &pa
tv.tv_sec = 20;
tv.tv_usec = 0;
- if (select(output[0] + 1, &fds, 0, 0, &tv) <= 0)
+ if (select(output[0] + 1, &fds, 0, 0, &tv) <= 0) {
+ if ( errno == EINTR || errno == EAGAIN ) continue;
break; // error or timeout
+ }
if (FD_ISSET(output[0], &fds)) {
count = read(output[0], data.data() + offset, 1024);
@@ -255,5 +258,5 @@ bool GSCreator::create(const QString &pa
if (!ok) // error or timeout, gs probably didn't exit yet
kill(pid, SIGTERM);
- int status;
+ int status = 0;
if (waitpid(pid, &status, 0) != pid || (status != 0 && status != 256) )
ok = false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic