diff options
author | Not Zed <NotZed@Ximian.com> | 2002-06-03 20:08:38 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-06-03 20:08:38 +0800 |
commit | 839b4be584653e671905a8fa772294cca01e44f7 (patch) | |
tree | ac62f5549bc00fbaae07bbc94d8c24a23c08058a /e-util/e-msgport.c | |
parent | d0a6ed17b65560ed07ed005b38fab449dc507aef (diff) | |
download | gsoc2013-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
Diffstat (limited to 'e-util/e-msgport.c')
-rw-r--r-- | e-util/e-msgport.c | 11 |
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")); } |