Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
mutt_dotlock(1)
Edit
PageHistory
Diff
Info
LikePages
dotlock !!!dotlock NAME SYNOPSIS DESCRIPTION OPTIONS FILES SEE ALSO DIAGNOSTICS NOTES HISTORY AUTHOR ---- !!NAME mutt_dotlock - Lock mail spool files. !!SYNOPSIS __mutt_dotlock__ [[-t|-f|-u|-d] [[-p] [[-r ''retries''] ''file'' !!DESCRIPTION __mutt_dotlock__ implements the traditional mail spool file locking method: To lock ''file'', a file named ''file''.lock is created. The program operates with group mail privileges if necessary. !!OPTIONS -t Just try. __mutt_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, __mutt_dotlock__ will break that lock by removing the lockfile. -u Unlock. __mutt_dotlock__ will remove ''file''.lock. -d Delete. __mutt_dotlock__ will lock ''file'', remove it if it has length 0, and afterwards remove ''file''.lock. -p Use privileges. If given this option, __mutt_dotlock__ will operate with group mail privileges when creating and deleting lock files. -r ''retries'' This command line option tells __mutt_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. __mutt_dotlock__ waits one second between successive locking attempts. !!FILES ''file''.lock The lock file __mutt_dotlock__ generates. !!SEE ALSO fcntl(2), flock(2), lockfile(1), mutt(1) !!DIAGNOSTICS __mutt_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 __mutt_dotlock__ is invoked with the __-f__ command line option, __mutt_dotlock__ won't generate this error, but break other processes' locks. __4 - DL_EX_NEED_RPIVS__ This return value only occurs if __mutt_dotlock__ has been invoked with the __-t__ command line option. It means that __mutt_dotlock__ will have to use its group mail privileges to lock ''file''. __5 - DL_EX_IMPOSSIBLE__ This return value only occurs if __mutt_dotlock__ has been invoked with the __-t__ command line option. It means that __mutt_dotlock__ is unable to lock ''file'' even with group mail privileges. !!NOTES __mutt_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, __mutt_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 comments in dotlock.c. !!HISTORY __mutt_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 ----
3 pages link to
mutt_dotlock(1)
:
mbox(5)
mutt(1)
Man1m
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.