summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;