mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
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>
This commit is contained in:
parent
cf89b40c4c
commit
58bb064afa
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue