Cygwin maildrop patches and issues (was Re: fetchmail 5.9.8 ...)

Jason Tishler jason@tishler.net
Fri Apr 19 11:09:00 GMT 2002


Rui,

On Sat, Mar 02, 2002 at 12:45:12AM +0000, Rui Carmo wrote:
> However, mutt then complains that /var/spool/mail/user is not a valid
> mbox file, since somewhere along the line, an extra blank line is inserted
> at the beginning of the mailbox upon creation. Editing it out by hand
> solves the problem, but is a rather lame fix.

The first attachment solves the above problem.

Unfortunately, I have discovered other problems:

1. maildrop appears (at least under Cygwin) to not quite respect
dotlocking and actually removes the lock file created by other
processes!  The second attachment "solves" this problem.

2. maildrop appears to lock in a different order (i.e., dotlock then
fcntl()) than mutt (and procmail) (i.e., fcntl() then dotlock) so I'm
concerned about race conditions.

3. maildrop causes Cygwin to spin while another process has locked a mbox
via fcntl(F_SETLK).  If interested, see the third attachment for details.

I'm interested in getting Cygwin maildrop to work because it is much
easier to build (and maintain) than procmail.  Unfortunately, I'm getting
the impression that maildrop is used more for maildirs than for mboxes...

Thanks,
Jason
-------------- next part --------------
--- formatmbox.C.orig	Mon Apr  1 21:01:02 2002
+++ formatmbox.C	Mon Apr  1 21:01:12 2002
@@ -42,7 +42,7 @@ time_t	tm;
 
 	time(&tm);
 
-	tempbuf="\nFrom ";
+	tempbuf="From ";
 	tempbuf += maildrop.msginfo.fromname;
 	tempbuf += ' ';
 
-------------- next part --------------
--- dotlock.C.orig	Tue Apr  2 01:57:49 2002
+++ dotlock.C	Tue Apr  2 01:58:58 2002
@@ -112,7 +112,7 @@ AlarmTimer	stat_timer;
 			}
 			else if (stat_timer.Expired())
 			{
-				unlink(lockfile);
+				// unlink(lockfile);
 			}
 		}
 
-------------- next part --------------
  108  147643 [main] maildrop 1816 fhandler_disk_file::fstat_helper: 0 = fstat (, 0x22C808) st_atime=3CA962A0 st_size=26158, st_mode=0x8180, st_ino=1446857, sizeof=88
  109  147752 [main] maildrop 1816 fstat64: 0 = fstat (3, 0x22C808)
14988895 15136647 [win] maildrop 1816 wndproc 275 WM_TIMER 1 0
  291 15136938 [win] maildrop 1816 _kill: kill (1816, 14)
  242 15137180 [win] maildrop 1816 sig_send: pid 1816, signal 14, its_me 1
   99 15137279 [win] maildrop 1816 sig_send: Waiting for thiscomplete 0x12C
  273 15137552 [sig] maildrop 1816 wait_sig: awake
  134 15137686 [sig] maildrop 1816 wait_sig: processing signal 14
   99 15137785 [sig] maildrop 1816 wait_sig: Got signal 14
   99 15137884 [sig] maildrop 1816 sig_handle: signal 14
  126 15138010 [sig] maildrop 1816 sig_handle: signal 14, about to call 0x41FCF4
  104 15138114 [sig] maildrop 1816 setup_handler: suspending mainthread
  180 15138294 [sig] maildrop 1816 interruptible: pc 0x77F8318B, h 0x77F80000, interruptible 1, testvalid 1
  181 15138475 [sig] maildrop 1816 interruptible: pc 0x77F8318B, h 0x77F80000, interruptible 0, testvalid 0
  111 15138586 [sig] maildrop 1816 setup_handler: couldn't send signal 14
  100 15138686 [sig] maildrop 1816 setup_handler: ResumeThread returned 1
  104 15138790 [sig] maildrop 1816 setup_handler: returning 0
   96 15138886 [sig] maildrop 1816 sig_handle: returning 0
  109 15138995 [win] maildrop 1816 sig_send: returning 0 from sending signal 14
   94 15139089 [win] maildrop 1816 kill_worker: 0 = kill_worker (1816, 14)
  108 15139197 [sig] maildrop 1816 wait_sig: looping
  103 15139300 [sig] maildrop 1816 wait_sig: awake
  103 15139403 [sig] maildrop 1816 wait_sig: processing signal 14
   95 15139498 [sig] maildrop 1816 wait_sig: Got signal 14
   93 15139591 [sig] maildrop 1816 sig_handle: signal 14
   95 15139686 [sig] maildrop 1816 sig_handle: signal 14, about to call 0x41FCF4
   96 15139782 [sig] maildrop 1816 setup_handler: suspending mainthread
  149 15139931 [sig] maildrop 1816 interruptible: pc 0x77F8318B, h 0x77F80000, interruptible 1, testvalid 1
  153 15140084 [sig] maildrop 1816 interruptible: pc 0x77F8318B, h 0x77F80000, interruptible 0, testvalid 0
  105 15140189 [sig] maildrop 1816 setup_handler: couldn't send signal 14
   99 15140288 [sig] maildrop 1816 setup_handler: ResumeThread returned 1
   95 15140383 [sig] maildrop 1816 setup_handler: returning 0
   94 15140477 [sig] maildrop 1816 sig_handle: returning 0

-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list