mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
util: close keys file lock on exec
This commit is contained in:
parent
ccc7e3afae
commit
bd48280290
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue