Store lockfiles under /var/lock/gkrellm-UID directories to make
lockfiles work for multiple users.
This commit is contained in:
parent
6365d18ad0
commit
40c7cb01ce
|
@ -10,6 +10,9 @@ GKrellM Changelog
|
|||
o ru.po from Roman Savochenko
|
||||
o uk.po new translation from Roman Savochenko
|
||||
o pt.po new translation from Ze based on pt_BR.po
|
||||
* Bugfixes
|
||||
o Store lockfiles under /var/lock/gkrellm-UID directories to make
|
||||
lockfiles work for multiple users.
|
||||
|
||||
2.3.5 - Thu Oct 7, 2010
|
||||
------------------------
|
||||
|
|
|
@ -270,14 +270,15 @@ _gkrellm_get_lock(void)
|
|||
gchar *lock_dir, *lock_file, *display, *s;
|
||||
gchar buf[32];
|
||||
|
||||
snprintf(buf, sizeof(buf), "LCK..%d", (gint) getuid());
|
||||
snprintf(buf, sizeof(buf), "LCK..gkrellm");
|
||||
|
||||
#if defined(F_TLOCK)
|
||||
lock_dir = "/var/lock/gkrellm";
|
||||
lock_dir = g_strdup_printf("/var/lock/gkrellm-%d", (gint) getuid());
|
||||
if (!g_file_test(lock_dir, G_FILE_TEST_IS_DIR))
|
||||
mkdir(lock_dir, 0755);
|
||||
|
||||
lock_file = gkrellm_make_config_file_name(lock_dir, buf);
|
||||
g_free(lock_dir);
|
||||
display = XDisplayName(NULL);
|
||||
if (display)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue