Next: , Previous: , Up: configuration   [Contents][Index]


3.2.9 The locking Statement

Syntax

locking {
  # Default locker flags.
  flags arg;
  
  # Set timeout for acquiring the lock.
  retry-timeout arg;
  
  # Set the maximum number of times to retry acquiring the lock.
  retry-count number;
  
  # Expire locks older than this amount of time.
  expire-timeout number;
  
  # Use prog as external locker program.
  external-locker prog;
}

Description

This block statement configures various parameters used when locking UNIX mailboxes in order to prevent simultaneous writes.

It is important to note, that locking applies only to traditional UNIX mailboxes (see mbox). All other mailbox types don’t require locking.

Configuration: flags string

Set locking flags. Argument is a string consisting of one or more of the following letters:

E

Use an external program to manage locks. The program is given by the external-locker statement (see below).

R

If the locking attempt failed, retry it. This is the default. The number of retries, and time interval between the two successive attempts is given by retry-count and retry-timeout statements, correspondingly.

T

If a lock file exists, check its modification time and, if it is older than a predefined amount of time, remove the lock. The amount of time is specified by expire-timeout statement.

P

Store the PID of the locking process in a lock file.

Configuration: retry-count number

Number of locking attempts. The ‘P’ flag must be set for this to take effect.

Configuration: retry-timeout seconds

Time interval, in seconds, between the two successive locking attempts. The ‘P’ flag must be set for this to take effect.

Configuration: expire-timeout seconds

Remove existing lock file, if it is created more than this number of seconds ago. The ‘T’ flag must be set for this to take effect.

Configuration: external-locker string

Determines the external locker program to use. The string argument is the valid command line, starting with the full program name. The ‘E’ flag must be set for this to take effect.


Next: , Previous: , Up: configuration   [Contents][Index]