summaryrefslogtreecommitdiff
path: root/shm
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-11-05 08:39:46 -0500
committerRyan Lortie <desrt@desrt.ca>2012-11-05 08:39:46 -0500
commitbbe86236d2f8c0a82af42da23399890f2bd25e23 (patch)
treeb4f5e19fc8b7a0ad63602de595b870ccab1f8cf0 /shm
parentbcd9ea89be7232d45d40a647660472c1f7ada61e (diff)
downloaddconf-bbe86236d2f8c0a82af42da23399890f2bd25e23.tar.gz
Add a comment for the previous commit
Provide a link to the bug with a justification for the unusual code.
Diffstat (limited to 'shm')
-rw-r--r--shm/dconf-shm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shm/dconf-shm.c b/shm/dconf-shm.c
index e47e377..d291305 100644
--- a/shm/dconf-shm.c
+++ b/shm/dconf-shm.c
@@ -133,6 +133,9 @@ dconf_shm_flag (const gchar *name)
* don't sync up their filesystem cache with mmap()ed regions.
*
* Using mmap() works everywhere.
+ *
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=687334 about
+ * why we need to have PROT_READ even though we only write.
*/
shm = mmap (NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
g_assert (shm != MAP_FAILED);