diff options
| author | Martin Ridgers <[email protected]> | 2022-02-21 13:28:40 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2022-02-21 13:28:40 +0100 |
| commit | 9910aa2db475c47ff97f4239e2393a940663685f (patch) | |
| tree | defc14379d3f7b1aefd0c893f0dcb0fcfd34f156 /zencore/thread.cpp | |
| parent | Linux compile fix (diff) | |
| download | zen-9910aa2db475c47ff97f4239e2393a940663685f.tar.xz zen-9910aa2db475c47ff97f4239e2393a940663685f.zip | |
If open(O_CREAT) is used then a file mode must be given
Diffstat (limited to 'zencore/thread.cpp')
| -rw-r--r-- | zencore/thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp index df8cb7a34..527938cf3 100644 --- a/zencore/thread.cpp +++ b/zencore/thread.cpp @@ -271,7 +271,7 @@ NamedEvent::NamedEvent(std::string_view EventName) ExtendableStringBuilder<64> EventPath; EventPath << "/tmp/" << EventName; - int Fd = open(EventPath.c_str(), O_RDWR | O_CREAT | O_CLOEXEC); + int Fd = open(EventPath.c_str(), O_RDWR | O_CREAT | O_CLOEXEC, 0666); if (Fd < 0) { ThrowLastError(fmt::format("Failed to create '{}' for named event", EventPath)); @@ -448,7 +448,7 @@ NamedMutex::Create(std::string_view MutexName) ExtendableStringBuilder<64> Name; Name << "/tmp/" << MutexName; - int Inner = open(Name.c_str(), O_RDWR | O_CREAT | O_CLOEXEC); + int Inner = open(Name.c_str(), O_RDWR | O_CREAT | O_CLOEXEC, 0666); if (Inner < 0) { return false; |