Re: Solaris 2.5 NFS apparent bug - ideas for workaround?

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Greg A. Woods
Cc: exim-users
Asunto: Re: Solaris 2.5 NFS apparent bug - ideas for workaround?
On Wed, 12 Feb 1997, Greg A. Woods wrote:

> It may be the open is necessary for those very systems where NFS is most
> likely to be used if indeed you ever fail to do lock-file-locking. In
> smail the OS config decides whether lock-file-locking will be attempted.


In Exim, there's a run-time configuration. I'm suggesting it should
always be "on" for NFS deliveries.

> I think what you're suggesting is always calling lock_file_by_name() and
> then opening the file, and finally doing kernel locking if the OS
> supports it and always using fcntl()(or lockf() since it used fcntl()?)
> where possible.


All the OS that Exim runs on support fcntl() locking. Several people
have said "flock is dead" to me, so Exim does not support it.

> Avoiding the silly kernel locking has *always* been the correct thing to
> do, and unfortunately many BSD mail-handling tools didn't always do
> this. Traditional file locking is just as easy to implement correctly
> in the application and has as you've discovered always been more
> reliable.


At least one Exim user is worried about the cost of create/delete lock
file each time as compared with fcntl() locking.

> Of course if not delivering over NFS is possible then that's an even
> better option! ;-)


True, but not always possible, of course.

--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714