upgrade 0.93.1

Gyepi SAM gyepi at praxis-sw.com
Tue Nov 23 22:42:27 CET 2004


On Tue, Nov 23, 2004 at 12:58:20PM -0800, Chris Wilkes wrote:

>   cp $in $in.old && mv $out $in

Small point: since mv replaces an existing file, the '-f' option may be useful here.

> What happens when bogofilter is using your wordlist when the move is in
> process?


Nothing. Any bogofilter instances with an open file descriptor will continue
to access the old file. Any new instances will see the new file.

Technically, this is not entirely true. mv uses the rename(2) system call when
the source and destination files are on the same file system and essentially
does a copy and delete otherwise. The former is atomic, the latter cannot be.
If a bogofilter instance starts up before mv calls rename(2) or before the call returns,
it gets the old copy. The window is small but non-zero.

-Gyepi



More information about the Bogofilter mailing list