diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-msgport.c | 11 |
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")); } |