summaryrefslogtreecommitdiff
path: root/os/connection.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-12-13 18:38:25 -0500
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-12-13 18:38:25 -0500
commitc8feb73f5841e7812d8dfdb91f1064e2033d028c (patch)
tree4f176f28ec27a4e5bfb9c671e569838741b6bfbd /os/connection.c
parent9a7ce573636e349ee2967991c7cc1407e80ae524 (diff)
parenta125ce4a84f5fb5934fefebd7cfb22a83180874d (diff)
Merge branch 'master' into XACE-SELINUX
Conflicts: Xext/EVI.c Xext/bigreq.c Xext/cup.c Xext/dpms.c Xext/fontcache.c Xext/mitmisc.c Xext/xcmisc.c Xext/xf86bigfont.c Xext/xtest.c configure.ac dbe/dbe.c hw/darwin/darwin.h hw/darwin/darwinEvents.c hw/darwin/iokit/xfIOKit.h hw/darwin/iokit/xfIOKitCursor.c hw/darwin/quartz/fullscreen/fullscreen.c hw/darwin/quartz/fullscreen/quartzCursor.c hw/darwin/quartz/quartz.c hw/darwin/quartz/quartzCommon.h hw/darwin/quartz/quartzCursor.c hw/darwin/quartz/xpr/dri.c hw/darwin/quartz/xpr/dristruct.h hw/darwin/quartz/xpr/xprCursor.c hw/darwin/quartz/xpr/xprFrame.c hw/xfree86/modes/xf86RandR12.c include/cursor.h miext/rootless/rootlessCommon.h miext/rootless/rootlessScreen.c miext/rootless/rootlessWindow.c render/picturestr.h Trying to pick up the pieces from the darwin churn here...
Diffstat (limited to 'os/connection.c')
-rw-r--r--os/connection.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/os/connection.c b/os/connection.c
index e0bc18a3c..3b5742c2b 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1048,9 +1048,12 @@ CheckConnections(void)
curclient = curoff + (i * (sizeof(fd_mask)*8));
FD_ZERO(&tmask);
FD_SET(curclient, &tmask);
- r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
+ do {
+ r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
+ } while (r < 0 && (errno == EINTR || errno == EAGAIN));
if (r < 0)
- CloseDownClient(clients[ConnectionTranslation[curclient]]);
+ if (ConnectionTranslation[curclient] > 0)
+ CloseDownClient(clients[ConnectionTranslation[curclient]]);
mask &= ~((fd_mask)1 << curoff);
}
}
@@ -1061,9 +1064,12 @@ CheckConnections(void)
curclient = XFD_FD(&savedAllClients, i);
FD_ZERO(&tmask);
FD_SET(curclient, &tmask);
- r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
- if (r < 0 && GetConnectionTranslation(curclient) > 0)
- CloseDownClient(clients[GetConnectionTranslation(curclient)]);
+ do {
+ r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
+ } while (r < 0 && (errno == EINTR || errno == EAGAIN));
+ if (r < 0)
+ if (GetConnectionTranslation(curclient) > 0)
+ CloseDownClient(clients[GetConnectionTranslation(curclient)]);
}
#endif
}