Fix the android-cloexec-* warnings in bootable/recovery
Add the O_CLOEXEC or 'e' accordingly. Bug: 63510015 Test: recovery tests pass Change-Id: I7094bcc6af22c9687eb535116b2ca6a59178b303
This commit is contained in:
+1
-1
@@ -265,7 +265,7 @@ int update_binary_command(const std::string& package, ZipArchiveHandle zip,
|
||||
}
|
||||
|
||||
unlink(binary_path.c_str());
|
||||
int fd = creat(binary_path.c_str(), 0755);
|
||||
int fd = open(binary_path.c_str(), O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0755);
|
||||
if (fd == -1) {
|
||||
PLOG(ERROR) << "Failed to create " << binary_path;
|
||||
return INSTALL_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user