From edd38207a67ea7d5c9c784a3304d044ab16fc06a Mon Sep 17 00:00:00 2001 From: Victor Chernyakin <56512186+LocalSpook@users.noreply.github.com> Date: Fri, 15 Dec 2023 00:53:32 -0700 Subject: [PATCH] Linux: Set O_CLOEXEC on evdev fd Closes #2446 --- src/linux_joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux_joystick.c b/src/linux_joystick.c index c67f3d77..07d41d37 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -135,7 +135,7 @@ static GLFWbool openJoystickDevice(const char* path) } _GLFWjoystickLinux linjs = {0}; - linjs.fd = open(path, O_RDONLY | O_NONBLOCK); + linjs.fd = open(path, O_RDONLY | O_NONBLOCK | O_CLOEXEC); if (linjs.fd == -1) return GLFW_FALSE;