Does the OS (POSIX) flush a memory-mapped file if the process is SIGKILLed?

后端 未结 2 799
陌清茗
陌清茗 2021-01-02 00:04

If a process is killed with SIGKILL, will the changes it has made to a memory-mapped file be flushed to disk? I assume that if the OS ensures a memory-mapped file is flushe

2条回答
  •  星月不相逢
    2021-01-02 00:30

    I posed a similar question myself and then followed up with demonstration code when I was unsatisfied with the answers. See mmap, msync and linux process termination

提交回复
热议问题