Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Tue, 3 Apr 2001 21:56:27 +0200 From: Marius Gedminas To: Cygwin Subject: Re: "Lock count exceeded" in mutt Message-ID: <20010403215627.A8718@gintaras> Mail-Followup-To: Cygwin References: <3AC9FED1 DOT 8F525542 AT upf DOT es> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-13 Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <3AC9FED1.8F525542@upf.es>; from wgarcia@upf.es on Tue, Apr 03, 2001 at 06:48:17PM +0200 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