aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-26 23:08:28 +0100
committerPřemysl Eric Janouch <p@janouch.name>2020-10-26 23:09:23 +0100
commitab5ca0cf8b4f803a8075c79939a5e9d466a9c0ea (patch)
tree114d20275f702a66a4a20acce3fc8f52de3051e2
parentf699b89dad389f14cb553b1d7f51151c86be3dde (diff)
downloadwdmtg-ab5ca0cf8b4f803a8075c79939a5e9d466a9c0ea.tar.gz
wdmtg-ab5ca0cf8b4f803a8075c79939a5e9d466a9c0ea.tar.xz
wdmtg-ab5ca0cf8b4f803a8075c79939a5e9d466a9c0ea.zip
Elaborate on avoiding XDG_RUNTIME_DIR
-rw-r--r--wdmtg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wdmtg.c b/wdmtg.c
index 4d819c8..d958968 100644
--- a/wdmtg.c
+++ b/wdmtg.c
@@ -744,7 +744,9 @@ main(int argc, char *argv[])
g_build_filename(g_get_user_data_dir(), PROJECT_NAME, NULL);
g_mkdir_with_parents(data_path, 0755);
- // Bind to a control socket, also ensuring only one instance is running
+ // Bind to a control socket, also ensuring only one instance is running.
+ // We're intentionally not using XDG_RUNTIME_DIR so that what is effectively
+ // the database lock is right next to the database.
gchar *socket_path = g_build_filename(data_path, "socket", NULL);
int socket_fd = socket_init(socket_path);
g_free(socket_path);