aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-26 09:41:40 +0000
committermarha <marha@users.sourceforge.net>2010-08-26 09:41:40 +0000
commit29990b52b9d48ba282da3c773a92316a33cc0b19 (patch)
tree5542038845387b00dc11aa00e5f0e4e61ba6c438 /libxcb/src
parentf1e55ffbe94408dc7aee8a9a5fbb45fdd72afe9b (diff)
parent9e5a55add045483af139e9e994325ca70eadc8fc (diff)
downloadvcxsrv-29990b52b9d48ba282da3c773a92316a33cc0b19.tar.gz
vcxsrv-29990b52b9d48ba282da3c773a92316a33cc0b19.tar.bz2
vcxsrv-29990b52b9d48ba282da3c773a92316a33cc0b19.zip
svn merge ^/branches/released .
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 cb0e4ff67..0723423f2 100644
--- a/libxcb/src/xcb_conn.c
+++ b/libxcb/src/xcb_conn.c
@@ -49,6 +49,11 @@
#include <X11/Xtrans/Xtrans.h>
+/* 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];
@@ -289,6 +294,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);