summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-06-04 23:21:41 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-06-04 23:21:41 +0000
commit52bca80eb968231c1a2dafb72ab2f0436815c1c7 (patch)
treebcede885387921a8c87543365b2657aaf12d4070
parent91b42b0014a369eac30ee694f8c55be5acbc59bf (diff)
parent54f535a3b43186727ff84fb4d604f6c57473d8ce (diff)
Merge "Pass SOCK_CLOEXEC to adb socket."
-rw-r--r--adbconnection/adbconnection.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/adbconnection/adbconnection.cc b/adbconnection/adbconnection.cc
index 8cd0d8bc9f..d399c2a25c 100644
--- a/adbconnection/adbconnection.cc
+++ b/adbconnection/adbconnection.cc
@@ -489,7 +489,7 @@ bool AdbConnectionState::SetupAdbConnection() {
int sleep_ms = 500;
const int sleep_max_ms = 2*1000;
- android::base::unique_fd sock(socket(AF_UNIX, SOCK_SEQPACKET, 0));
+ android::base::unique_fd sock(socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0));
if (sock < 0) {
PLOG(ERROR) << "Could not create ADB control socket";
return false;