bruceg/daemontools-encore — pull request #7 by wolfen (2012-09-23 02:31:52+00:00)
Title: Added three new options to the setlock program

I have implemented support for 3 new options to the "setlock" program:

-t n will cause setlock to "time out" (and exit with an error) after n seconds
-b n will cause setlock to "block" for n seconds after acquiring lock and before running the program
-p path will cause setlock to write its PID and a Unix timestamp to the specified file

I find the -b option useful for testing the -t option, and the -p option useful for tracking down locking issues with contending daemons.

The test cases for setlock have been updated to reflect the new options.