From 0dc39f9952c5e3a3121ea77357bb264ef0f8ded7 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 22 Sep 2014 17:43:09 -0700 Subject: 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 --- linker/debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linker/debugger.cpp') diff --git a/linker/debugger.cpp b/linker/debugger.cpp index 6565985b5..ac466a5b4 100644 --- a/linker/debugger.cpp +++ b/linker/debugger.cpp @@ -215,7 +215,7 @@ static void send_debuggerd_packet(siginfo_t* info) { 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) { __libc_format_log(ANDROID_LOG_FATAL, "libc", "Unable to open connection to debuggerd: %s", strerror(errno)); -- cgit v1.2.3