Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lbdb_dotlock(1) [debian man page]

dotlock(1)							   User Manuals 							dotlock(1)

NAME
lbdb_dotlock - Lock mail spool files. SYNOPSIS
lbdb_dotlock [-t|-f|-u|-d] [-r retries] file DESCRIPTION
dotlock implements the traditional mail spool file locking method: To lock file, a file named file.lock is created. OPTIONS
-t Just try. dotlock won't actually lock a file, but inform the invoking process if it's at all possible to lock file. -f Force the lock. If another process holds a lock on file longer than a certain amount of time, dotlock will break that lock by removing the lockfile. -u Unlock. dotlock will remove file.lock. -d Delete. dotlock will lock file, remove it if it has length 0, and afterwards remove file.lock. -r retries This command line option tells dotlock to try locking retries times before giving up or (if invoked with the -f command line option) break a lock. The default value is 5. dotlock waits one second between successive locking attempts. FILES
file.lock The lock file dotlock generates. SEE ALSO
fcntl(2), flock(2), lockfile(1), lbdb-fetchaddr(1) DIAGNOSTICS
dotlock gives all diagnostics in its return values: 0 - DL_EX_OK The program was successful. 1 - DL_EX_ERROR An unspecified error such as bad command line parameters, lack of system memory and the like has occured. 3 - DL_EX_EXIST The user wants to lock a file which has been locked by another process already. If dotlock is invoked with the -f command line option, dotlock won't generate this error, but break other processes' locks. 4 - DL_EX_NEED_RPIVS This return value only occurs if dotlock has been invoked with the -t command line option. It means that dotlock will have to use its group mail privileges to lock file. 5 - DL_EX_IMPOSSIBLE This return value only occurs if dotlock has been invoked with the -t command line option. It means that dotlock is unable to lock file. NOTES
dotlock tries to implement an NFS-safe dotlocking method which was borrowed from lockfile(1). If the user can't open file for reading with his normal privileges, dotlock will return the DL_EX_ERROR exit value to avoid certain attacks against other users' spool files. The code carefully avoids race conditions when checking permissions; for details of all this see the com- ments in dotlock.c. HISTORY
dotlock is part of the Mutt mail user agent package. It has been created to avoid running mutt with group mail privileges. AUTHOR
Thomas Roessler <roessler@guug.de> Unix OCTOBER 2005 dotlock(1)

Check Out this Related Man Page

DOTLOCK.MAILUTILS(1)                                               User Commands                                              DOTLOCK.MAILUTILS(1)

NAME
dotlock.mailutils - lock mail spool files. SYNOPSIS
dotlock.mailutils [OPTION...] FILE DESCRIPTION
GNU dotlock -- lock mail spool files. -d, --[no-]debug print details of failure reasons to stderr -f, --force[=MINUTES] forcibly break an existing lock older than a certain time -r, --retry[=RETRIES] retry the lock a few times -u, --[no-]unlock unlock Global debugging settings --debug-level=LEVEL set Mailutils debugging level --[no-]debug-line-info show source info with debugging messages Configuration handling --config-file=FILE load this configuration file; implies --no-config --config-lint check configuration file syntax and exit --config-verbose verbosely log parsing of the configuration files --no-config do not load site and user configuration files --no-site-config do not load site-wide configuration file --no-user-config do not load user configuration file --set=PARAM=VALUE set configuration parameter Informational options --config-help show configuration file summary --show-config-options show compilation options -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. Returns 0 on success, 3 if locking the file fails because it's already locked, and 1 if some other kind of error occurred. REPORTING BUGS
Report bugs to <bug-mailutils@gnu.org>. GNU Mailutils home page: <http://mailutils.org> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The complete GNU mailutils documentation is maintained as a Texinfo manual. If the mailutils-doc package is installed, the command info mailutils should give you access to the complete manual. You can also find this manual online in the GNU mailutils webpage: https://www.gnu.org/software/mailutils/manual/index.html. Please note this manpage was automatically generated by the Debian mailutils packagers. Do not file bugs for its content to the GNU Mailu- tils upstream authors. FSF November 2017 DOTLOCK.MAILUTILS(1)
Man Page