Mail Archives: cygwin/2001/04/03/16:49:37
Hi,
On Tue, Apr 03, 2001 at 06:48:17PM +0200, Walter Garcia-Fontes wrote:
> Dear list,
> I'm asking this question because despite the fact that it refers to
> mutt, it has also to do with cygwin (file permissions on the file
> structure, for programs picky with permissions such as all mail
> programs...)
>
> Whenever I'm opening mutt I get the message:
> "Lock count exceeded, do you want to remove lock [y,n]?"
Mutt tries to use dotlocking:
Dotlocking is used on all kinds of systems. In order to lock
an mbox file named folder, an application first creates a
temporary file with a unique name in the directory in which the
folder resides. The application then tries to use the link(2)
system call to create a hard link named folder.lock to the
temporary file. The success of the link(2) system call should
be additionally verified using stat(2) calls. If the link has
succeeded, the mail folder is considered dotlocked. The temporary
file can then safely be unlinked.
In order to release the lock, an application just unlinks the
folder.lock file.
-- mbox(5)
/var/spool/mail is usually group-writable, and mutt_dotlock is sgid to
group `mail', so it can create the necessary files. However suid/sgid
executables do not work on CygWin, so /var/spool/mail needs to be
writable by you.
This problem also occurs when the mailbox is on a FAT partition (even on
Linux) -- hard links are not supported there.
Currently I am using Mutt with a spool file in ~/Mail/ (on NTFS
partition) and have no problems with that. Well, except the fact that
./configure from maildrop aborts since it cannot find a system-wide mail
spool. But I digress.
Perhaps Mutt CygWin package should be compiled without dotlocking by
default (#undef USE_DOTLOCK in config.h)? Mutt also uses flock/fcntl to
do locking, shouldn't that be enough? And there are also native Windows
mandatory locks.
Or maybe use --with-homespool instead? But that will not solve the
problem with FAT partitions.
See mbox.man that comes with Mutt for details about locking methods.
I'm not sure if this file is available in CygWin's mutt package; I'm
looking at the one from CVS now. But I think I've seen that description
earlier, in some other file from Mutt docs.
Marius Gedminas
--
"I'll be Bach." -- Johann Sebastian Schwarzenegger
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -