parent
eb7d2b9481
commit
11304d3a60
|
@ -10,7 +10,7 @@ major_version=4
|
||||||
cache_dir=$CM_DIR/clipmenu.$major_version.$USER/
|
cache_dir=$CM_DIR/clipmenu.$major_version.$USER/
|
||||||
cache_file=$cache_dir/line_cache
|
cache_file=$cache_dir/line_cache
|
||||||
lock_file=$cache_dir/lock
|
lock_file=$cache_dir/lock
|
||||||
lock_timeout=2
|
lock_timeout=5
|
||||||
has_clipnotify=0
|
has_clipnotify=0
|
||||||
|
|
||||||
xsel_log=/dev/null
|
xsel_log=/dev/null
|
||||||
|
@ -120,6 +120,7 @@ while true; do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
{
|
||||||
if ! flock -x -w "$lock_timeout" "$lock_fd"; then
|
if ! flock -x -w "$lock_timeout" "$lock_fd"; then
|
||||||
if (( CM_ONESHOT )); then
|
if (( CM_ONESHOT )); then
|
||||||
printf 'ERROR: %s\n' 'Timed out waiting for lock' >&2
|
printf 'ERROR: %s\n' 'Timed out waiting for lock' >&2
|
||||||
|
@ -176,8 +177,10 @@ while true; do
|
||||||
done
|
done
|
||||||
|
|
||||||
flock -u "$lock_fd"
|
flock -u "$lock_fd"
|
||||||
|
} &
|
||||||
|
|
||||||
if (( CM_ONESHOT )); then
|
if (( CM_ONESHOT )); then
|
||||||
|
wait
|
||||||
debug 'Oneshot mode enabled, exiting'
|
debug 'Oneshot mode enabled, exiting'
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue