OSDN Git Service

Open the device node with O_CLOEXEC
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 18 Jul 2016 15:51:12 +0000 (16:51 +0100)
committerRob Herring <robh@kernel.org>
Tue, 13 Dec 2016 15:43:49 +0000 (09:43 -0600)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Not 100% sure it is supported on Android.

gralloc_gbm.cpp

index 25cbf51..f162bf4 100644 (file)
@@ -233,7 +233,7 @@ struct gbm_device *gbm_dev_create(void)
        int fd;
 
        property_get("gralloc.gbm.device", path, "/dev/dri/renderD128");
-       fd = open(path, O_RDWR);
+       fd = open(path, O_RDWR | O_CLOEXEC);
        if (fd < 0) {
                ALOGE("failed to open %s", path);
                return NULL;