From 6b694a76f5da14f8a8e8610fb02ccdb519c54ae7 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Tue, 29 Nov 2016 15:20:18 -0800 Subject: [PATCH] ion.c: add O_CLOEXEC to /dev/ion open Test: device boots and no obvious problems. Change-Id: I0845b79de49b77878adaf6cd14cc506f7586cccb --- libion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libion/ion.c b/libion/ion.c index 2db88453e..a7b22b839 100644 --- a/libion/ion.c +++ b/libion/ion.c @@ -34,7 +34,7 @@ int ion_open() { - int fd = open("/dev/ion", O_RDONLY); + int fd = open("/dev/ion", O_RDONLY | O_CLOEXEC); if (fd < 0) ALOGE("open /dev/ion failed!\n"); return fd;