From a9d87b4cfdc4f7c0bfcd46e3c91888246384f919 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 30 Jun 2025 20:25:33 +0200 Subject: [PATCH] stream: set file sharing on POSIX Signed-off-by: Simon Rozman --- include/stdex/stream.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/stdex/stream.hpp b/include/stdex/stream.hpp index 8b8c4de67..4bc3c2438 100644 --- a/include/stdex/stream.hpp +++ b/include/stdex/stream.hpp @@ -2811,6 +2811,8 @@ namespace stdex case mode_create: flags |= O_CREAT | O_TRUNC; break; default: throw std::invalid_argument("invalid mode"); } + if (mode & share_reading) flags |= O_SHLOCK; + if (mode & share_writing) flags |= O_EXLOCK; if (mode & hint_write_thru) flags |= O_DSYNC; #ifndef __APPLE__ if (mode & hint_no_buffering) flags |= O_RSYNC;