diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-07-06 09:15:04 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-07-06 09:15:04 +0000 |
commit | 49083e59d822d963dffabadeec92387a7f93567f (patch) | |
tree | 98997001e4a83e7ebb6c3e039adebe2ac0628465 /Functions | |
parent | 4d5d0327a1f4b16ed3dd3056d0c73e86a1d6582b (diff) | |
download | zsh-49083e59d822d963dffabadeec92387a7f93567f.tar.gz zsh-49083e59d822d963dffabadeec92387a7f93567f.tar.xz zsh-49083e59d822d963dffabadeec92387a7f93567f.zip |
unposted: improved calendar_lockfiles configuration
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/Calendar/calendar_lockfiles | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Functions/Calendar/calendar_lockfiles b/Functions/Calendar/calendar_lockfiles index 054b3f74b..93fbce060 100644 --- a/Functions/Calendar/calendar_lockfiles +++ b/Functions/Calendar/calendar_lockfiles @@ -3,13 +3,13 @@ local file lockfile msgdone # Number of attempts to lock a file. Probably not worth stylising. -integer lockattempts=3 loadtried +integer lockattempts=4 loadtried # The lockfile name is not stylised: it has to be a fixed # derivative of the main fail. for file; do lockfile=$file.lockfile - for (( i = 0; i < lockattempts; i++ )); do + for (( i = 0; i <= lockattempts; i++ )); do if ln -s $file $lockfile >/dev/null 2>&1; then lockfiles+=($lockfile) break @@ -24,10 +24,10 @@ for file; do fi if zmodload -e zsh/zselect; then # This gives us finer grained timing (100th second). - # Randomize the sleep between .1 and 1 second so that + # Randomize the sleep between .1 and 2 seconds so that # we are much less likely to have multiple instances # retrying at once. - zselect -t $(( 10 + RANDOM * 90 / 32768 )) + zselect -t $(( 10 + RANDOM * 190 / 32768 )) else sleep 1 fi |