On Mon, 11 Sep 2000, Trevor Sky Garside wrote:
> How does Exim handle the case where it tries to run appendfile on a file
> that is locked by the filesystem?
Take a look at the code in the exim_lock utility. It is effectively the
same as the code Exim uses to lock mailboxes. It has options that
correspond to the various locking options of appendfile.
The details of locking are documented in section 15.2 of the
specification. Note that exim uses fcntl() locks (compatible with
lockf()). It does not use flock(), which is not network aware, I
understand.
If Exim cannot get a lock on the file within a given time, it defers
delivery. The default is wait-and-try-again, but there is an option that
will make it use a blocking call to fcntl(). This is documented in
doc/NewStuff, version 3.14, number 3 - it hasn't made it into the manual
yet.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.