8 Apr
2014
8 Apr
'14
8:42 a.m.
Phil Mayers wrote:
Any write() needs to be wrapped in a loop to ensure the entire buffer was handled.
Yes. I'll see if I can put a wrapper function into src/lib/
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?).
Small writes are less likely to be broken up. It's luck, mostly. Alan DeKok.