summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Abhijeet Kaur <abkaur@google.com> 2019-09-13 17:13:28 -0700
committer android-build-merger <android-build-merger@google.com> 2019-09-13 17:13:28 -0700
commite18c7b102f3572991315e51e7ba48ecc70ffd8f0 (patch)
treef11163bdc679018f85584e733a5b3a0be46fc843
parent5dd64b1ea2b4c3c3580806e3dc0926b655a72a1f (diff)
parent9d3110837714a82051fddc670fab83704b16c4db (diff)
Merge "Set close-on-exec flag for bugreportz socket in dumpstate" am: c998eaa1dc am: 7a46cda5f5 am: d61cf64625
am: 9d31108377 Change-Id: Ib527e8215e30954c34b4f876fad21e0994f61289
-rw-r--r--cmds/dumpstate/dumpstate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 3f2469cde4..fb476db5b9 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -3505,7 +3505,7 @@ int open_socket(const char *service) {
struct sockaddr addr;
socklen_t alen = sizeof(addr);
- int fd = accept(s, &addr, &alen);
+ int fd = accept4(s, &addr, &alen, SOCK_CLOEXEC);
// Close socket just after accept(), to make sure that connect() by client will get error
// when the socket is used by the other services.