Re: [Exim] Quirky Bug?

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Greg Ward
CC: exim-users
Asunto: Re: [Exim] Quirky Bug?
On Thu, 29 Nov 2001, Greg Ward wrote:

> On 29 November 2001, Marc Perkel said:
> > Something I noticed. When editing my system filter file I've noticed
> > that if a message comes in at the same time I'm actually doing the
> > saving of the file from my editor (file locked I believe) that Exim will
> > ignore the filter.


Exim doesn't apply any form of locking when it reads a filter.

> What editor are you using? I think a sensible editor would do something
> like this, to minimize the window during which the file doesn't exist:
>
> f = open("file.tmp")
> write(f, file_contents)
> close(f)
> rename("file", "file~")
> rename("file.tmp", "file")
>
> There's still a small window of file-not-there between the two renames,
> but it's pretty small.
>
> IOW, this might be your editor's fault, and not Exim's.


That seems likely to me too. A safer way to proceed would be to run a
script like this:

cp filter filter.copy
youreditor filter.copy
if [ $? = 0 ]; then
mv filter.copy filter
fi


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.