aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu2017-07-10 17:13:33 -0500
committerTianjie Xu2017-07-19 14:17:41 -0500
commitde6735e80cc65be50381388640d94f1b1d0f20fa (patch)
treebdcda7cd5a4e2baa1f45c66f6a1698df47119175 /install.cpp
parent8155a8ba74bce27626f3ce3f088951298c44776d (diff)
downloadplatform-bootable-recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar.gz
platform-bootable-recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar.xz
platform-bootable-recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.zip
Fix the android-cloexec-* warnings in bootable/recovery
Add the O_CLOEXEC or 'e' accordingly. Bug: 63510015 Test: recovery tests pass Change-Id: I7094bcc6af22c9687eb535116b2ca6a59178b303
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/install.cpp b/install.cpp
index 7ba8f013..7fbf5c01 100644
--- a/install.cpp
+++ b/install.cpp
@@ -265,7 +265,7 @@ int update_binary_command(const std::string& package, ZipArchiveHandle zip,
265 } 265 }
266 266
267 unlink(binary_path.c_str()); 267 unlink(binary_path.c_str());
268 int fd = creat(binary_path.c_str(), 0755); 268 int fd = open(binary_path.c_str(), O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0755);
269 if (fd == -1) { 269 if (fd == -1) {
270 PLOG(ERROR) << "Failed to create " << binary_path; 270 PLOG(ERROR) << "Failed to create " << binary_path;
271 return INSTALL_ERROR; 271 return INSTALL_ERROR;