[...]
On the other hand, in theory, more than one process can write nonblocking to the same pipe. So its better to use atomic writes with buffers <= PIPE_BUF, to avoid, that the processes interleaves.
It does not actually help in current implementation because pipe writes in syslog-ng do not preserve message boundaries. So it does not matter if OS inserts data from different writers between two syslog-ng writes or in the middle of 4K block write - in both cases great chances are at least one line is mangled.
Hmm... could you send me a reference where you read this? I doubt it is true.
My favorite references are: APUE and UNP books by R.W.Stevens (the godfather himself :) and many of the linux/solaris man(2,3*,4,5,7) manpages.
Hmm ... I prefer The Real Unix Standard :-) http://www.opengroup.org/onlinepubs/007904975/toc.htm Happy New Year to everybody -andrey