projects
/
pgtranslation
/
admin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9faabb1
)
Use flock for locking instead of hand-crafted mechanism
author
Peter Eisentraut
<peter_e@gmx.net>
Tue, 7 Feb 2012 20:13:15 +0000
(20:13 +0000)
committer
Peter Eisentraut
<peter_e@gmx.net>
Tue, 7 Feb 2012 20:13:15 +0000
(20:13 +0000)
wwwtools/update-nls-www
patch
|
blob
|
blame
|
history
diff --git
a/wwwtools/update-nls-www
b/wwwtools/update-nls-www
index 8b46b37441858ef00267ec5fa561d970a1e355bc..354d6a2dca398c0ab447aea24a920df412fad6c6 100755
(executable)
--- a/
wwwtools/update-nls-www
+++ b/
wwwtools/update-nls-www
@@
-25,10
+25,8
@@
if [ -n "$1" ]; then
force=true
fi
-lock="$PWD/lock"
-test -e "$lock" && exit 77
-trap 'rm -f $tmp $lock' EXIT ERR SIGHUP SIGINT SIGPIPE SIGTERM
-touch "$lock"
+(
+flock -n 9 || exit 0
for branch in $active_branches; do
tmp=`mktemp /tmp/$me.XXXXXX`
@@
-78,3
+76,5
@@
for branch in $active_branches; do
done
date -u +%FT%T
+
+) 9>"$PWD/lock"