diff options
author | Elliott Hughes <enh@google.com> | 2014-09-22 17:43:09 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-09-22 17:43:09 -0700 |
commit | 0dc39f9952c5e3a3121ea77357bb264ef0f8ded7 (patch) | |
tree | 7c19c0e5fda4bceccb0b0e0a1542a661f8c10f55 /libc/bionic/system_properties.cpp | |
parent | e8a95624b6ee37f7ee85f0318f1fccd916292ebd (diff) | |
download | android_bionic-0dc39f9952c5e3a3121ea77357bb264ef0f8ded7.tar.gz android_bionic-0dc39f9952c5e3a3121ea77357bb264ef0f8ded7.tar.bz2 android_bionic-0dc39f9952c5e3a3121ea77357bb264ef0f8ded7.zip |
Fix a couple more cases of missing CLOEXEC.
The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.
Change-Id: Idba6a4f1d68587ec5b320d1e25f0b6a987ea32a0
Diffstat (limited to 'libc/bionic/system_properties.cpp')
-rw-r--r-- | libc/bionic/system_properties.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp index 411d6bf34..170e7ac97 100644 --- a/libc/bionic/system_properties.cpp +++ b/libc/bionic/system_properties.cpp @@ -471,8 +471,8 @@ static const prop_info *find_property(prop_bt *const trie, const char *name, static int send_prop_msg(const prop_msg *msg) { - const int fd = socket(AF_LOCAL, SOCK_STREAM, 0); - if (fd < 0) { + const int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0); + if (fd == -1) { return -1; } |