aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-06-03 20:08:38 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-06-03 20:08:38 +0800
commit839b4be584653e671905a8fa772294cca01e44f7 (patch)
treeac62f5549bc00fbaae07bbc94d8c24a23c08058a
parentd0a6ed17b65560ed07ed005b38fab449dc507aef (diff)
downloadgsoc2013-evolution-839b4be584653e671905a8fa772294cca01e44f7.tar.gz
gsoc2013-evolution-839b4be584653e671905a8fa772294cca01e44f7.tar.zst
gsoc2013-evolution-839b4be584653e671905a8fa772294cca01e44f7.zip
Protect against EINTR (irix?), see bug #24086.
2002-06-03 Not Zed <NotZed@Ximian.com> * e-msgport.c (e_msgport_wait): Protect against EINTR (irix?), see bug #24086. svn path=/trunk/; revision=17074
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-msgport.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 842e78b281..c5714f56c7 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-03 Not Zed <NotZed@Ximian.com>
+
+ * e-msgport.c (e_msgport_wait): Protect against EINTR (irix?), see
+ bug #24086.
+
2002-05-07 Ettore Perazzoli <ettore@ximian.com>
* e-corba-utils.c (e_safe_corba_string_dup): New.
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"));
}