Loading minui/events.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ int ev_init(ev_callback input_cb, bool allow_touch_inputs) { dirent* de; while ((de = readdir(dir))) { if (strncmp(de->d_name, "event", 5)) continue; int fd = openat(dirfd(dir), de->d_name, O_RDONLY); int fd = openat(dirfd(dir), de->d_name, O_RDONLY | O_CLOEXEC); if (fd == -1) continue; // Use unsigned long to match ioctl's parameter type. Loading minui/graphics_adf.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ int MinuiBackendAdf::DeviceInit(adf_device* dev) { err = adf_device_attach(dev, eng_id, intf_id); if (err < 0 && err != -EALREADY) return err; intf_fd = adf_interface_open(dev, intf_id, O_RDWR); intf_fd = adf_interface_open(dev, intf_id, O_RDWR | O_CLOEXEC); if (intf_fd < 0) return intf_fd; err = InterfaceInit(); Loading minui/graphics_drm.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ GRSurface* MinuiBackendDrm::Init() { /* Consider DRM devices in order. */ for (int i = 0; i < DRM_MAX_MINOR; i++) { auto dev_name = android::base::StringPrintf(DRM_DEV_NAME, DRM_DIR_NAME, i); android::base::unique_fd fd(open(dev_name.c_str(), O_RDWR)); android::base::unique_fd fd(open(dev_name.c_str(), O_RDWR | O_CLOEXEC)); if (fd == -1) continue; /* We need dumb buffers. */ Loading minui/graphics_fbdev.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ void MinuiBackendFbdev::SetDisplayedFramebuffer(size_t n) { } GRSurface* MinuiBackendFbdev::Init() { android::base::unique_fd fd(open("/dev/graphics/fb0", O_RDWR)); android::base::unique_fd fd(open("/dev/graphics/fb0", O_RDWR | O_CLOEXEC)); if (fd == -1) { perror("cannot open fb0"); return nullptr; Loading Loading
minui/events.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ int ev_init(ev_callback input_cb, bool allow_touch_inputs) { dirent* de; while ((de = readdir(dir))) { if (strncmp(de->d_name, "event", 5)) continue; int fd = openat(dirfd(dir), de->d_name, O_RDONLY); int fd = openat(dirfd(dir), de->d_name, O_RDONLY | O_CLOEXEC); if (fd == -1) continue; // Use unsigned long to match ioctl's parameter type. Loading
minui/graphics_adf.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ int MinuiBackendAdf::DeviceInit(adf_device* dev) { err = adf_device_attach(dev, eng_id, intf_id); if (err < 0 && err != -EALREADY) return err; intf_fd = adf_interface_open(dev, intf_id, O_RDWR); intf_fd = adf_interface_open(dev, intf_id, O_RDWR | O_CLOEXEC); if (intf_fd < 0) return intf_fd; err = InterfaceInit(); Loading
minui/graphics_drm.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ GRSurface* MinuiBackendDrm::Init() { /* Consider DRM devices in order. */ for (int i = 0; i < DRM_MAX_MINOR; i++) { auto dev_name = android::base::StringPrintf(DRM_DEV_NAME, DRM_DIR_NAME, i); android::base::unique_fd fd(open(dev_name.c_str(), O_RDWR)); android::base::unique_fd fd(open(dev_name.c_str(), O_RDWR | O_CLOEXEC)); if (fd == -1) continue; /* We need dumb buffers. */ Loading
minui/graphics_fbdev.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ void MinuiBackendFbdev::SetDisplayedFramebuffer(size_t n) { } GRSurface* MinuiBackendFbdev::Init() { android::base::unique_fd fd(open("/dev/graphics/fb0", O_RDWR)); android::base::unique_fd fd(open("/dev/graphics/fb0", O_RDWR | O_CLOEXEC)); if (fd == -1) { perror("cannot open fb0"); return nullptr; Loading