This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
how do exit and _exit affect mmapped memory?
- From: Dmitry Goncharov <dgoncharov at users dot sf dot net>
- To: libc-help at sourceware dot org
- Cc: dgoncharov at users dot sf dot net
- Date: Sat, 8 Sep 2012 23:12:05 -0400
- Subject: how do exit and _exit affect mmapped memory?
Good morning,
A program uses glibc on linux. The program uses mmap with flag MAP_SHARED.
The program never calls munmap or msync.
Is there a guarantee that the contents of the mapped memory will be stored to
the file when the program calls exit?
Is there such a guarantee if the program calls _exit or is killed by a signal?
Does calling munmap give such a guarantee?
Thanks.
regards, Dmitry