Coding question / mmap:
I'm mmap'ing a file (Python, but I guess mmap should behave the same no matter which language), read-only. Code is constantly reading from the mmap'ed buffer. Another process is writing to the same file. Process reading from the file stops with a Bus error. Is this... to be expected? I find it surprising, to say the least. @dalias maybe you know?
Conversation
Notices
-
Embed this notice
hanno (hanno@mastodon.social)'s status on Tuesday, 15-Apr-2025 20:26:29 JST hanno
-
Embed this notice
Rich Felker (dalias@hachyderm.io)'s status on Tuesday, 15-Apr-2025 20:26:29 JST Rich Felker
@hanno The process writing first truncated it. Reading from past EOF will give bis error.
-
Embed this notice