Skip to content

Commit

Permalink
Fix mdbm_reset_all_locks.
Browse files Browse the repository at this point in the history
  • Loading branch information
timrc-git committed Jun 13, 2018
1 parent d49389c commit 264c93d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions gendoc/README
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ print <<EOF
MDBM Version 4 is a significant improvement to version 3 by optionally using
pthreads instead of ylock. Additionally, all y* package dependencies are gone.
Version 4.12.4 (06/12/2018, crowdert)
- Fix off-by-one in mash.
- Fix variable usage, () vs {}, in mdbm_reset_all_locks.
Version 4.12.3 (01/12/2016, crowdert)
- Use realpath unconditionally in mdbm_delete_lockfiles
Expand Down
8 changes: 4 additions & 4 deletions src/scripts/mdbm_reset_all_locks
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

BIN_BASE=/usr/local/bin
mlock=$(BIN_BASE)/mdbm_lock
mlock64=$(BIN_BASE)64/mdbm_lock
mlock=${BIN_BASE}/mdbm_lock
mlock64=${BIN_BASE}64/mdbm_lock

for l in `/usr/bin/find /tmp/.mlock-named -type f | /bin/grep "_int_$"`; do
# extract mdbm name from lock name
Expand All @@ -14,9 +14,9 @@ for l in `/usr/bin/find /tmp/.mlock-named -type f | /bin/grep "_int_$"`; do

# mutex size is 32-byte (20-hex) for 32-bit, 48-byte (30-hex) for 64-bit
if [[ "x$sz" == "x20" ]]; then
$(mlock) -r $d
${mlock} -r $d
else
$(mlock64) -r $d
${mlock64} -r $d
fi
done

0 comments on commit 264c93d

Please sign in to comment.