aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-msgport.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-msgport.c')
-rw-r--r--e-util/e-msgport.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/e-util/e-msgport.c b/e-util/e-msgport.c
index e04fa8dc9a..6fc83588c6 100644
--- a/e-util/e-msgport.c
+++ b/e-util/e-msgport.c
@@ -201,13 +201,16 @@ EMsg *e_msgport_wait(EMsgPort *mp)
mp->condwait--;
} else {
fd_set rfds;
+ int retry;
m(printf("wait: waitng on pipe\n"));
- FD_ZERO(&rfds);
- FD_SET(mp->pipe.fd.read, &rfds);
g_mutex_unlock(mp->lock);
- select(mp->pipe.fd.read+1, &rfds, NULL, NULL, NULL);
- pthread_testcancel();
+ do {
+ FD_ZERO(&rfds);
+ FD_SET(mp->pipe.fd.read, &rfds);
+ retry = select(mp->pipe.fd.read+1, &rfds, NULL, NULL, NULL) == -1 && errno == EINTR;
+ pthread_testcancel();
+ } while (retry);
g_mutex_lock(mp->lock);
m(printf("wait: got pipe\n"));
}