diff --git a/libcutils/ashmem-dev.c b/libcutils/ashmem-dev.c index b4abb79d8..95f2259ec 100644 --- a/libcutils/ashmem-dev.c +++ b/libcutils/ashmem-dev.c @@ -51,7 +51,7 @@ static int __ashmem_open_locked() int ret; struct stat st; - int fd = TEMP_FAILURE_RETRY(open(ASHMEM_DEVICE, O_RDWR)); + int fd = TEMP_FAILURE_RETRY(open(ASHMEM_DEVICE, O_RDWR | O_CLOEXEC)); if (fd < 0) { return fd; }