mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-21 20:28:28 +00:00
Make sure SDL file descriptors don't leak into child processes
This commit is contained in:
parent
3ed8ba7d33
commit
bf97c5a22f
15 changed files with 24 additions and 24 deletions
|
@ -725,7 +725,7 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class)
|
|||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
item->fd = open(dev_path, O_RDONLY | O_NONBLOCK);
|
||||
item->fd = open(dev_path, O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
if (item->fd < 0) {
|
||||
SDL_free(item);
|
||||
return SDL_SetError("Unable to open %s", dev_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue