rlm_linelog & locking

Alan DeKok aland at deployingradius.com
Tue Apr 21 16:17:37 CEST 2009


Phil Mayers wrote:
> It appears rlm_linelog doesn't lock the file before writing to it.
> Should it? Won't lines get interspersed at high logging rates if not?

  IIRC, using O_APPEND, and writing small amounts means that the writes
are "all or nothing".  i.e. The OS takes care of ensuring that the write
succeeds.

  This means that lines from different threads will get put into the log
file in arbitrary order.  But the lines *won't* be split in the middle.

  Alan DeKok.



More information about the Freeradius-Users mailing list