3.0.2: rlm_sql_null duplicating its statements

Phil Mayers p.mayers at imperial.ac.uk
Tue Apr 8 12:57:41 CEST 2014


On 08/04/14 09:12, Arran Cudbard-Bell wrote:

> There is that other multi variable version of write, but i'm not
> sure if it's guaranteed to be atomic.

Plain old write() is not guaranteed to be atomic, let alone writev(). 
Signals can interrupt writing and necessitate a retry.

Any write() needs to be wrapped in a loop to ensure the entire buffer 
was handled.

IIRC there are some weak guarantees in which a write() will tend to be 
atomic - something related to PIPE_BUF even though it's a plain file? - 
which is why rlm_linelog doesn't suffer interleaving problems (much?).


More information about the Freeradius-Users mailing list