commit | f73183f1a34df22b62a3d0bbf82e18d5797c9cde | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Tue Aug 26 16:20:59 2014 -0700 |
committer | Elliott Hughes <enh@google.com> | Tue Aug 26 16:20:59 2014 -0700 |
tree | 1bc3c9a47180aaeb2f734e835034a3f6b9ac9d00 | |
parent | 7b87d441b0f2aa3ad5021ab6bd879a995a1bc2ce [diff] [blame] |
More cases where libc should use O_CLOEXEC. Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
diff --git a/libc/bionic/pthread_setname_np.cpp b/libc/bionic/pthread_setname_np.cpp index 1ddf810..7b2fa6b 100644 --- a/libc/bionic/pthread_setname_np.cpp +++ b/libc/bionic/pthread_setname_np.cpp
@@ -67,7 +67,7 @@ } char comm_name[sizeof(TASK_COMM_FMT) + 8]; snprintf(comm_name, sizeof(comm_name), TASK_COMM_FMT, tid); - int fd = open(comm_name, O_WRONLY); + int fd = open(comm_name, O_CLOEXEC | O_WRONLY); if (fd == -1) { return errno; }