summaryrefslogtreecommitdiff
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:41:06 -0500
commita223d9b3fb23f6103e9f270d9e71cb381b201b0d (patch)
tree4bc274e9439a79b019053dbdcae372b4d9437742
parentbb965d6cb392a620287b3dc0110ab19cf4f50c64 (diff)
downloaddconf-a223d9b3fb23f6103e9f270d9e71cb381b201b0d.tar.gz
Add a comment for the previous commit
Provide a link to the bug with a justification for the unusual code.
-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);