From f139ba47a13de0637732af9fd70aab0e8c877e45 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Wed, 23 May 2018 16:44:53 +0000 Subject: [PATCH] Revert "adb: add support for O_CLOEXEC to unique_fd pipe wrapper." This reverts commit 948b3e1068470cda390566452ccbaeb526a56e4e. Reason for revert: mac doesn't have pipe2 Change-Id: Id6a517bb500cbea602839f06452bc5e6d92289f1 --- adb/adb_unique_fd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adb/adb_unique_fd.h b/adb/adb_unique_fd.h index 0dd86872d..9c02cbeec 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; #if !defined(_WIN32) -inline bool Pipe(unique_fd* read, unique_fd* write, int flags = 0) { +inline bool Pipe(unique_fd* read, unique_fd* write) { int pipefd[2]; - if (pipe2(pipefd, flags) != 0) { + if (pipe(pipefd) != 0) { return false; } read->reset(pipefd[0]);