From d02548d87a4a4e5a2e049d63fb6d08867239bfc5 Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 5 Mar 2019 19:19:13 +0100 Subject: backend/session: open TTY with O_CLOEXEC for direct session --- backend/session/direct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/session/direct.c') diff --git a/backend/session/direct.c b/backend/session/direct.c index 0912cd58..7225bff0 100644 --- a/backend/session/direct.c +++ b/backend/session/direct.c @@ -155,7 +155,7 @@ static int vt_handler(int signo, void *data) { } static bool setup_tty(struct direct_session *session, struct wl_display *display) { - int fd = open("/dev/tty", O_RDWR); + int fd = open("/dev/tty", O_RDWR | O_CLOEXEC); if (fd == -1) { wlr_log_errno(WLR_ERROR, "Cannot open /dev/tty"); return false; -- cgit v1.2.3