Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff1697c1 authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

Merge "More O_CLOEXEC" am: 43e42608

am: 66824c36

* commit '66824c36':
  More O_CLOEXEC
parents 6fc536c9 66824c36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ struct binder_state *binder_open(size_t mapsize)
        return NULL;
    }

    bs->fd = open("/dev/binder", O_RDWR);
    bs->fd = open("/dev/binder", O_RDWR | O_CLOEXEC);
    if (bs->fd < 0) {
        fprintf(stderr,"binder: cannot open device (%s)\n",
                strerror(errno));
+1 −2
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class BinderDriverInterfaceTestEnv : public ::testing::Environment {
            int ret;
            uint32_t max_threads = 0;

            m_binderFd = open(BINDER_DEV_NAME, O_RDWR | O_NONBLOCK);
            m_binderFd = open(BINDER_DEV_NAME, O_RDWR | O_NONBLOCK | O_CLOEXEC);
            ASSERT_GE(m_binderFd, 0);
            m_buffer = mmap(NULL, 64*1024, PROT_READ, MAP_SHARED, m_binderFd, 0);
            ASSERT_NE(m_buffer, (void *)NULL);