[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mailbox locks, part2



Inspired by Greg A Woods comments, I went ahead and built a bit more
generic mechanism to handle all locking styles and things.  (It did
also clean up the code quite radically...)
ZENV variable  MBOXLOCKS  defines which locks are to be acquired,
and in what order:
	.	UNIX dot-lock (At Solaris/SysVr4(?): maillock() )
	L	lockf() -locks
	F	flock() -locks
Default for the  MBOXLOCKS  value (and thus the sequence) is:  "."

By looking at the code, I do think that at the moment there are no
locks when appending to non-mailbox files.

I wonder, should there be a separate FILELOCKS variable with default
depending wether or not  flock()  is usable: "F" or "L".
Or perhaps  MBOXLOCKS should be ".F" or ".L" in every case ?
(New Linuxes seriously dislike same program doing lockf() and flock()
 locks...)

Hmm.. there is still that mailbox double-creation problem,
that our correspondent from Argentina noticed.  Well, tomorrow
is a new day :)  Good night folks.

	/Matti Aarnio