Make sure SDL file descriptors don't leak into child processes
This commit is contained in:
1 parent
3ed8ba7d33
commit
bf97c5a22f
15 files changed
+24
-24
No files matched your search
@@ -716,7 +716,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path, int bExclusive)
|
||||
dev = new_hid_device();
|
||||
|
||||
/* OPEN HERE */
|
||||
dev->device_handle = open(path, O_RDWR);
|
||||
dev->device_handle = open(path, O_RDWR | O_CLOEXEC);
|
||||
|
||||
/* If we have a good handle, return it. */
|
||||
if (dev->device_handle >= 0) {
|
||||
|
||||
Reference in new issue
Block a user