What happens if process crashes when flushinig mapped file?

433 Views Asked by At

I'm using boost::interprocess::managed_mapped_file to do IPC under linux. In short one process can write objects into files (method construct) for another process to read (method find). However what if the process crashes while writing? Will boost handle this automatically or I have to add a mechanism to detect such failure?

1

There are 1 best solutions below

0
On

If process crashes result is not defined - nothing can know how much I/O it could have done. But I would think that OS is probably doing I/O in some units, probably at least one block (512 bytes) or page (4KB).