mail-lock(1) - phpMan

Command: man perldoc info search(apropos)  


lockfile-progs(1)                       Lockfile programs                       lockfile-progs(1)



NAME
       lockfile-progs  - command-line programs to safely lock and unlock files and mailboxes (via
       liblockfile).

SYNOPSIS
       mail-lock [ --retry retry-count ]
       mail-unlock
       mail-touchlock [ --oneshot ]

       lockfile-create [ --retry retry-count ] filename
       lockfile-remove filename
       lockfile-touch [ --oneshot ] filename

DESCRIPTION
       lockfile-progs provide a method to  lock  and  unlock  mailboxes  and  files  safely  (via
       liblockfile).

       By  default,  the  filename  argument refers to the name of the file to be locked, and the
       name of the lockfile will be filename .lock.  However,  if  the  --lock-name  argument  is
       specified, then filename will be taken as the name of the lockfile itself.

       mail-lock: lock the current user's mailbox.
       mail-unlock: unlock the current user's mailbox.
       mail-touchlock: touch the lock on the current user's mailbox.

       Each of the mail locking commands is applied to the file /var/spool/mail/<user>, if possi-
       ble, where <user> is the name of the current user (determined from the effective  uid  via
       geteuid(2)).

       lockfile-create: lock a given file.
       lockfile-remove: remove the lock on a given file.
       lockfile-touch: touch the lock on a given file.

       Once  a  file  is locked, the lock must be touched at least once every five minutes, or it
       will be considered stale and a subsequent attempt to lock the file will succeed.  For both
       of the locking commands (mail-touchlock and lockfile-touch), the --oneshot argument causes
       the program to touch the lock and exit immediately.  Otherwise the program will loop  for-
       ever, touching the lock once every minute until it is killed.

       For  both  of  the  locking commands (mail-lock and lockfile-create), the --retry argument
       specifies (as an integer) the maximum number of times to retry  locking  the  file  before
       giving  up  if  attempts are failing.  Each retry will be delayed a little longer than the
       last (in 5 second increments) until a maximum delay  of  one  minute  between  retries  is
       reached.   The  default  retry  count is 9 which, if all 9 attempts to lock the file fail,
       will give up after 180 seconds (3 minutes).

       The lockfile-create, lockfile-remove, and lockfile-touch commands will also  accept  these
       options:

       -l, --lock-name
              Use  filename as the explict lock file name instead of appending .lock to filename.

       All of the following commands will accept these options:

       -q, --quiet
              Supress any output.  Success or failure will only be indicated by the exit  status.

       -v, --verbose
              Enable diagnostic output.


EXAMPLES
       Locking a file during a lengthy process:

         lockfile-create /some/file
         lockfile-touch /some/file &
         # Save the PID of the lockfile-touch process
         BADGER="$!"
         do-something-important-with /some/file
         kill "${BADGER}"
         lockfile-remove /some/file


EXIT STATUS
       0      Successful program execution.

       ANYTHING ELSE
              Some problem was encountered.

SEE ALSO
       maillock(3)
       touchlock(3)
       mailunlock(3)
       lockfile-create(1)
       lockfile-remove(1)
       lockfile-touch(1)
       lockfile_create(3)
       lockfile_remove(3)
       lockfile_touch(3)

HISTORY
       1998 - Written by Rob Browning <rlb AT defaultvalue.org>.



0.1.11                                    23 August 2007                        lockfile-progs(1)

Generated by $Id: phpMan.php,v 4.49 2006/02/26 13:18:18 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2012-05-25 22:36 @38.107.179.239 Crawled by CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
Valid XHTML 1.0!Valid CSS!