Skip to content

Commit

Permalink
logwrap: add missing O_CLOEXEC
Browse files Browse the repository at this point in the history
Bug: 148236233
Bug: 150260863
Test: build
Merged-In: Ibe070d5d4f3a7ada0718f74c7cee12db7b9f920e
Change-Id: Ibe070d5d4f3a7ada0718f74c7cee12db7b9f920e
(cherry picked from commit b5b162e2048ac3294713bed975250ecae7bf2389)

Former-commit-id: 9f0c0c79238cd6694d679a9518b8384c47c4185f
  • Loading branch information
Tom Cherry committed Feb 27, 2020
1 parent 978be8a commit adf346b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logwrapper/logwrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static int parent(const char* tag, int parent_read, pid_t pid, int* chld_sts, in
}

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;
Expand Down

0 comments on commit adf346b

Please sign in to comment.