aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-26 06:21:42 +0000
committermarha <marha@users.sourceforge.net>2010-08-26 06:21:42 +0000
commit9e5a55add045483af139e9e994325ca70eadc8fc (patch)
tree73cecd62f74add9d92dfa89bff5dd7fc22177120 /libxcb/src
parentc5e0555ef58f02918a9803cb910e2cc523260d5d (diff)
downloadvcxsrv-9e5a55add045483af139e9e994325ca70eadc8fc.tar.gz
vcxsrv-9e5a55add045483af139e9e994325ca70eadc8fc.tar.bz2
vcxsrv-9e5a55add045483af139e9e994325ca70eadc8fc.zip
libxcb pixman git update 26/8/2010
Diffstat (limited to 'libxcb/src')
-rw-r--r--libxcb/src/xcb_conn.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c
index c6656cea3..2ab84eac0 100644
--- a/libxcb/src/xcb_conn.c
+++ b/libxcb/src/xcb_conn.c
@@ -42,6 +42,11 @@
#include <sys/select.h>
#endif
+/* SHUT_RDWR is fairly recent and is not available on all platforms */
+#if !defined(SHUT_RDWR)
+#define SHUT_RDWR 2
+#endif
+
typedef struct {
uint8_t status;
uint8_t pad0[5];
@@ -247,6 +252,9 @@ void xcb_disconnect(xcb_connection_t *c)
return;
free(c->setup);
+
+ /* disallow further sends and receives */
+ shutdown(c->fd, SHUT_RDWR);
close(c->fd);
pthread_mutex_destroy(&c->iolock);