Lines Matching refs:this_lock
118 typeset this_lock=$LOCKFILE
120 this_lock=${LOCKFILE}.log
122 postrun_debug "Taking lock on $this_lock"
126 ln -s $$ $this_lock 2>/dev/null
128 postrun_debug "Lock on $this_lock taken"
133 typeset pid=$(ls -ld $this_lock \
136 postrun_debug "Lock on $this_lock already held by this pid ($$)"
144 postrun_debug "Waiting for $pid to release $this_lock"
147 postrun_debug "Stale lock $this_lock from $pid being released"
148 rm -f $this_lock
158 typeset this_lock=$LOCKFILE
160 this_lock=${LOCKFILE}.log
162 postrun_debug "Releasing lock on $this_lock"
164 typeset pid=$(ls -ld $this_lock \
167 if ! rm -f $this_lock; then
168 echo "postrun: error: cannot remove lock file $this_lock" 1>&2
171 postrun_debug "Released lock on $this_lock taken by pid $pid"