summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao2017-08-25 20:00:18 -0500
committerJosh Gao2017-08-28 16:51:07 -0500
commitfdf832dfd3b2f1be9d3ba831ff85b323a61ee8a3 (patch)
tree41f7132b05979b0187f91f264f45911f78015ea6 /debuggerd/util.cpp
parent75a40988c0e7a35f2663b644989ce012b66f4586 (diff)
downloadplatform-system-core-fdf832dfd3b2f1be9d3ba831ff85b323a61ee8a3.tar.gz
platform-system-core-fdf832dfd3b2f1be9d3ba831ff85b323a61ee8a3.tar.xz
platform-system-core-fdf832dfd3b2f1be9d3ba831ff85b323a61ee8a3.zip
base: add Pipe and Socketpair wrappers.
Also, switch debuggerd_handler over to using android::base::unique_fd. Test: treehugger Change-Id: I97b2ce22f1795ce1c4370f95d00d769846cc54b8
Diffstat (limited to 'debuggerd/util.cpp')
-rw-r--r--debuggerd/util.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/debuggerd/util.cpp b/debuggerd/util.cpp
index c6a997bef..0bb07ac1b 100644
--- a/debuggerd/util.cpp
+++ b/debuggerd/util.cpp
@@ -86,13 +86,3 @@ ssize_t recv_fd(int sockfd, void* _Nonnull data, size_t len, unique_fd* _Nullabl
86 86
87 return result; 87 return result;
88} 88}
89
90bool Pipe(unique_fd* read, unique_fd* write) {
91 int pipefds[2];
92 if (pipe(pipefds) != 0) {
93 return false;
94 }
95 read->reset(pipefds[0]);
96 write->reset(pipefds[1]);
97 return true;
98}