commit | 8420e4a7e5ed5626f1b09e9a6c928e76651e3f65 | [log] [tgz] |
---|---|---|
author | Tom Cherry <tomcherry@google.com> | Mon Mar 02 16:49:56 2020 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Mon Mar 02 16:49:56 2020 +0000 |
tree | 44194979eb0a1c63c6af06c382cd4111a4236002 | |
parent | 10986940d72eedf8ccc60d7e3f06fd1fae9aa7fc [diff] | |
parent | 6991c7502c30c766ab61c62ed218d7a7a56e599d [diff] |
Merge "logwrap: add missing O_CLOEXEC" into rvc-dev
diff --git a/logwrapper/logwrap.cpp b/logwrapper/logwrap.cpp index 5337801..5a518bc 100644 --- a/logwrapper/logwrap.cpp +++ b/logwrapper/logwrap.cpp
@@ -374,7 +374,7 @@ } if (log_target & LOG_FILE) { - fd = open(file_path, O_WRONLY | O_CREAT, 0664); + fd = open(file_path, O_WRONLY | O_CREAT | O_CLOEXEC, 0664); if (fd < 0) { ERROR("Cannot log to file %s\n", file_path); log_target &= ~LOG_FILE;