diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-05-23 00:17:32 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-23 00:17:32 +0000 |
| commit | 812a6b77c65a3fbeaa49235f907fdd90cf25d1de (patch) | |
| tree | c03a1cf5e4de378355f92250fb3086da2fd4ab07 /adb | |
| parent | 7a223584c5c72f7d16e6abc490125faa2349d98a (diff) | |
| parent | 948b3e1068470cda390566452ccbaeb526a56e4e (diff) | |
| download | system_core-812a6b77c65a3fbeaa49235f907fdd90cf25d1de.tar.gz system_core-812a6b77c65a3fbeaa49235f907fdd90cf25d1de.tar.bz2 system_core-812a6b77c65a3fbeaa49235f907fdd90cf25d1de.zip | |
Merge "adb: add support for O_CLOEXEC to unique_fd pipe wrapper."
Diffstat (limited to 'adb')
| -rw-r--r-- | adb/adb_unique_fd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/adb_unique_fd.h b/adb/adb_unique_fd.h index 9c02cbeec..0dd86872d 100644 --- a/adb/adb_unique_fd.h +++ b/adb/adb_unique_fd.h @@ -28,9 +28,9 @@ struct AdbCloser { using unique_fd = android::base::unique_fd_impl<AdbCloser>; #if !defined(_WIN32) -inline bool Pipe(unique_fd* read, unique_fd* write) { +inline bool Pipe(unique_fd* read, unique_fd* write, int flags = 0) { int pipefd[2]; - if (pipe(pipefd) != 0) { + if (pipe2(pipefd, flags) != 0) { return false; } read->reset(pipefd[0]); |
