[NTLUG:Discuss] Flock file hanging around

Neil Aggarwal neil at JAMMConsulting.com
Mon Jan 28 21:28:48 CST 2013


Stuart:

> You shouldn't need the brackets around your flock command.

Thanks for the example link.  I solved the problem with the
flock command.

Unfortunately, I ran into another problem.
Every time I run the script, it updates the timestamp on the 
lock file so this check:

>    if [ $(( $(date +%s) - $(date +%s -r $LOCKFILE) )) -gt 3600 ]; then

Always gives me zero for the time difference.

Any suggestions on how to determine if the script is wedged
and not terminating?

Thanks,
  Neil

--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges






More information about the Discuss mailing list