summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2011-12-05 10:04:37 +0200
committerKristian Høgsberg <krh@bitplanet.net>2011-12-05 09:52:09 -0500
commit58bb064afa3bfc706e3b30dd170804235aa272ea (patch)
tree7b1eec3b2762299183409b4bdf8b94dfff73015d /src
parentcf89b40c4ca105416240df737ba8e30c070a44af (diff)
client: unset WAYLAND_SOCKET env variable
WAYLAND_SOCKET contains a file descriptor that is an open connection to a Wayland server. It is private to us, and makes no sense to relay the same value (or any value) to our child processes. Unset the environment variable to prevent it from being accidentally relayed to other processes. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/wayland-client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index 939c17d..22244f8 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -352,6 +352,7 @@ wl_display_connect(const char *name)
flags = fcntl(display->fd, F_GETFD);
if (flags != -1)
fcntl(display->fd, F_SETFD, flags | FD_CLOEXEC);
+ unsetenv("WAYLAND_SOCKET");
} else if (connect_to_socket(display, name) < 0) {
free(display);
return NULL;