aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwayland.c
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2019-03-06 02:53:12 +0000
committerGitHub <noreply@github.com>2019-03-06 02:53:12 +0000
commita3c31bb875b10cda6e795588ef111d8e17fb83a7 (patch)
tree3ad6dea6fb84cb29c61314c69ee9586f16c86984 /xwayland/xwayland.c
parent6a8f17b5f636a0ce90a4ed8342803baee30de1b3 (diff)
parent8363ca8c9fbe7030854d6f4200a19444e6c31469 (diff)
Merge pull request #1606 from emersion/xwayland-dev-null
xwayland: set CLOEXEC on /dev/null FD
Diffstat (limited to 'xwayland/xwayland.c')
-rw-r--r--xwayland/xwayland.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index 015c33e7..489640d3 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -1,4 +1,4 @@
-#define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200809L
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
@@ -92,7 +92,7 @@ _Noreturn static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) {
// Closes stdout/stderr depending on log verbosity
enum wlr_log_importance verbosity = wlr_log_get_verbosity();
- int devnull = open("/dev/null", O_WRONLY | O_CREAT, 0666);
+ int devnull = open("/dev/null", O_WRONLY | O_CREAT | O_CLOEXEC, 0666);
if (devnull < 0) {
wlr_log_errno(WLR_ERROR, "XWayland: failed to open /dev/null");
_exit(EXIT_FAILURE);