From 0fe7ce375ed6c9fcd86b8bb3a836bc37c9740831 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Wed, 23 Dec 2015 18:58:05 -0800 Subject: More O_CLOEXEC Change-Id: I31991ed089f395174857e86e509b8190ad98f92a --- libs/binder/ProcessState.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libs/binder/ProcessState.cpp') diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 821ab6cb9b..33fe26cfa9 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -310,9 +310,8 @@ void ProcessState::giveThreadPoolName() { static int open_driver() { - int fd = open("/dev/binder", O_RDWR); + int fd = open("/dev/binder", O_RDWR | O_CLOEXEC); if (fd >= 0) { - fcntl(fd, F_SETFD, FD_CLOEXEC); int vers = 0; status_t result = ioctl(fd, BINDER_VERSION, &vers); if (result == -1) { -- cgit v1.2.3-59-g8ed1b