Skip to content
Snippets Groups Projects
Commit 52eb8d0c authored by intrigeri's avatar intrigeri
Browse files

Fix "Locking mechanism causes variable problem".

Thanks to Olivier Berger for the patch.
parent 69c0ec09
No related branches found
No related tags found
No related merge requests found
......@@ -325,7 +325,7 @@ function process_action() {
# start locked section : avoid concurrent execution of the same backup
# uses a construct specific to shell scripts with flock. See man flock for details
(
{
debug "executing handler in locked section controlled by $lockfile"
flock -x -w 5 200
# if all is good, we acquired the lock
......@@ -352,7 +352,7 @@ function process_action() {
debug "failed to acquire lock"
echo "Fatal: Could not acquire lock $lockfile. A backup is probably already running for $file." >>$bufferfile
fi
) 200> $lockfile
} 200> $lockfile
# end of locked section
_warnings=`cat $bufferfile | grep "^Warning: " | wc -l`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment