-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike Noyes wrote:
> I need to fix it so it's robust enough for the new SF requirements. > Locking has me a bit confused, and I'll need to read how to add that to > daily.sh. I'll attempt to address these issues when I work on our > documentation build process. If the lockfile utility is available on the SF servers (highly likely, but I didn't check), it's pretty easy: <code> #!/bin/sh LOCKFILE=leafcron.lock # Get the lockfile if we can, don't retry if we can't lockfile -r 0 $LOCKFILE # Test to see if we have the lockfile if [ "$?" -ne 0 ] ; then echo "Couldn't get lockfile!" exit 1 fi echo "Got lock file: $LOCKFILE" # Do more stuff here... # Done with everything...remove lockfile rm -f $LOCKFILE </code> If lockfile isn't available, you can do mostly the same thing using "touch" and checking for the prior existence of a file, but it's not as graceful as lockfile, particularly when it comes to atomically checking for and creating the lock (shouldn't exactly be a problem for a cron job though, but it is an issue for multiple process access to mailbox files, which is why lockfile exists in the first place). Holler if you need help with the above, or any other scripting chores. - -- Charles Steinkuehler [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD8mXhLywbqEHdNFwRAnTXAJ9pj9H6Ea8XI/4vVyfK1SIK9q96rgCcC4GQ nZ/EwESoj01Lgwac3+n4CZo= =YZDw -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel