Skip to content

Commit

Permalink
fix: specify mode for ::open call
Browse files Browse the repository at this point in the history
  • Loading branch information
program-- committed Sep 19, 2023
1 parent f75cd2e commit 5bb6ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/utilities/mmap_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ struct basic_pool {
name += "/ngen_mmap_XXXXXX";
mkstemp(&name[0]);

const int fd = ::open(name.c_str(), O_CREAT | O_RDWR | O_TRUNC);
const int fd = ::open(name.c_str(), O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR);

::unlink(name.c_str());
return fd;
Expand Down

0 comments on commit 5bb6ddc

Please sign in to comment.