am 5d953ddd: am 93951cfa: Merge "Fix a couple more cases of missing CLOEXEC."

* commit '5d953ddd40445f337c1f54a4fb1e2b3741245809':
  Fix a couple more cases of missing CLOEXEC.
This commit is contained in:
Elliott Hughes 2014-09-23 16:20:22 +00:00 committed by Android Git Automerger
commit 719e8a4b88
2 changed files with 3 additions and 3 deletions

View File

@ -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) static int send_prop_msg(const prop_msg *msg)
{ {
const int fd = socket(AF_LOCAL, SOCK_STREAM, 0); const int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0);
if (fd < 0) { if (fd == -1) {
return -1; return -1;
} }

View File

@ -215,7 +215,7 @@ static void send_debuggerd_packet(siginfo_t* info) {
return; return;
} }
int s = socket_abstract_client(DEBUGGER_SOCKET_NAME, SOCK_STREAM); int s = socket_abstract_client(DEBUGGER_SOCKET_NAME, SOCK_STREAM | SOCK_CLOEXEC);
if (s == -1) { if (s == -1) {
__libc_format_log(ANDROID_LOG_FATAL, "libc", "Unable to open connection to debuggerd: %s", __libc_format_log(ANDROID_LOG_FATAL, "libc", "Unable to open connection to debuggerd: %s",
strerror(errno)); strerror(errno));