sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f0509a2be2b74b4fa91fdf1984271b23c146db02)
- From: Jaka Kranjc <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f0509a2be2b74b4fa91fdf1984271b23c146db02)
- Date: Mon, 31 Dec 2007 15:53:01 -0600
GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
ChangeLog | 3 +++
var/lib/sorcery/modules/liblock | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit f0509a2be2b74b4fa91fdf1984271b23c146db02
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
liblock: avoid two possible tiny race conditions
(cherry picked from commit a408e4bcfcb50f102e3d6423b2c6442658cda59e)
diff --git a/ChangeLog b/ChangeLog
index ab93a84..4db7787 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2007-12-31 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * liblock: avoid two possible tiny race conditions
+
2007-11-23 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* sorcery: rewrote show_installed_spell and fixed remove_pkgs -
removing
spells from the sorcery menu works again
diff --git a/var/lib/sorcery/modules/liblock b/var/lib/sorcery/modules/liblock
index 82ff964..0006fc9 100755
--- a/var/lib/sorcery/modules/liblock
+++ b/var/lib/sorcery/modules/liblock
@@ -83,12 +83,13 @@ trylock_resources()
if ! mkdir "${lockfile}" 2>/dev/null; then
# we try to remove stale locks here and try again
+ sleep 0.1
global_clean_resources
if ! mkdir "${lockfile}" 2>/dev/null; then
return 1
fi
fi
- ln -sf /proc/$$ "${lockfile}/$$"
+ [[ -e ${lockfile}/$$ ]] || ln -s /proc/$$ "${lockfile}/$$"
return 0
}
- [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f0509a2be2b74b4fa91fdf1984271b23c146db02), Jaka Kranjc, 12/31/2007
Archive powered by MHonArc 2.6.24.