diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-10-20 20:34:00 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-10-20 20:34:01 +0200 |
commit | ea99acad5ae7346add42119e59d0f687184f4a33 (patch) | |
tree | a2e6fcf22bb24c26aec5717a40712110a2edc25e /src | |
parent | Merge pull request #4610 (diff) | |
parent | util: close keys file lock on exec (diff) | |
download | monero-ea99acad5ae7346add42119e59d0f687184f4a33.tar.xz |
Merge pull request #4626
a69fc05a util: close keys file lock on exec (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp index 2a1d49af0..7d8c9aa99 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -233,7 +233,7 @@ namespace tools MERROR("Failed to open " << filename << ": " << std::error_code(GetLastError(), std::system_category())); } #else - m_fd = open(filename.c_str(), O_RDONLY | O_CREAT, 0666); + m_fd = open(filename.c_str(), O_RDONLY | O_CREAT | O_CLOEXEC, 0666); if (m_fd != -1) { if (flock(m_fd, LOCK_EX | LOCK_NB) == -1) |