mirror of
https://github.com/glfw/glfw.git
synced 2025-06-08 00:34:56 +00:00
Set O_CLOEXEC
on open()
call when opening joysticks on Linux
This commit is contained in:
parent
2c1d31009f
commit
3475ac20bc
@ -137,7 +137,7 @@ static GLFWbool openJoystickDevice(const char* path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_GLFWjoystickLinux linjs = {0};
|
_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)
|
if (linjs.fd == -1)
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user