diff options
| author | Nick Kralevich <nnk@google.com> | 2019-03-30 01:27:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-03-30 01:27:38 +0000 |
| commit | a59868d6de213fb949a7bf701b99eb91e6d95a9f (patch) | |
| tree | 7632128c05ade6efe3b92612351930e62c64d0af /Checkpoint.cpp | |
| parent | 3889f17ad1d6d8ec591f93fca2f8a455768c5239 (diff) | |
| parent | e7e89acbc8a7312950ee00f0da4497261fe8264f (diff) | |
Merge "vold: cleanups for O_CLOEXEC tidy checks."
Diffstat (limited to 'Checkpoint.cpp')
| -rw-r--r-- | Checkpoint.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Checkpoint.cpp b/Checkpoint.cpp index 2b353f1..e784c91 100644 --- a/Checkpoint.cpp +++ b/Checkpoint.cpp @@ -575,7 +575,7 @@ Status cp_restoreCheckpoint(const std::string& blockDevice, int restore_limit) { Status status = Status::ok(); LOG(INFO) << action << " checkpoint on " << blockDevice; - base::unique_fd device_fd(open(blockDevice.c_str(), O_RDWR)); + base::unique_fd device_fd(open(blockDevice.c_str(), O_RDWR | O_CLOEXEC)); if (device_fd < 0) { PLOG(ERROR) << "Cannot open " << blockDevice; return Status::fromExceptionCode(errno, ("Cannot open " + blockDevice).c_str()); |
