mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
LinuxInputDeviceManager: Fix fcntl() call
This commit is contained in:
parent
77f33f3642
commit
ff66728212
@ -33,7 +33,8 @@ LinuxInputDeviceManager::
|
|||||||
LinuxInputDeviceManager() {
|
LinuxInputDeviceManager() {
|
||||||
// Use inotify to watch /dev/input for hotplugging of devices.
|
// Use inotify to watch /dev/input for hotplugging of devices.
|
||||||
_inotify_fd = inotify_init();
|
_inotify_fd = inotify_init();
|
||||||
fcntl(_inotify_fd, O_NONBLOCK | O_CLOEXEC);
|
fcntl(_inotify_fd, F_SETFL, O_NONBLOCK);
|
||||||
|
fcntl(_inotify_fd, F_SETFD, FD_CLOEXEC);
|
||||||
|
|
||||||
if (_inotify_fd < 0) {
|
if (_inotify_fd < 0) {
|
||||||
device_cat.error()
|
device_cat.error()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user