summaryrefslogtreecommitdiff
path: root/service/dconf-writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'service/dconf-writer.c')
-rw-r--r--service/dconf-writer.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/service/dconf-writer.c b/service/dconf-writer.c
index 71d694c..3cf58f5 100644
--- a/service/dconf-writer.c
+++ b/service/dconf-writer.c
@@ -81,10 +81,17 @@ dconf_writer_touch_shm (DConfWriter *writer)
gint fd;
fd = open (writer->shm, O_WRONLY);
- write (fd, &one, sizeof one);
- close (fd);
- unlink (writer->shm);
+ if (fd >= 0)
+ {
+ write (fd, &one, sizeof one);
+ close (fd);
+
+ unlink (writer->shm);
+ }
+
+ else if (errno != ENOENT)
+ unlink (writer->shm);
}
gboolean