Skip to content

Commit

Permalink
util: close keys file lock on exec
Browse files Browse the repository at this point in the history
  • Loading branch information
moneromooo-monero committed Oct 16, 2018
1 parent 5c85da5 commit a69fc05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a69fc05

Please sign in to comment.