Linux: Set O_CLOEXEC on evdev fd

Closes #2446
This commit is contained in:
Victor Chernyakin 2023-12-15 00:53:32 -07:00 committed by Camilla Löwy
parent 9953f7ead1
commit edd38207a6

View File

@ -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;