Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > O_APPEND in POSIX is race-free only up to PIPE_MAX bytes written at a > time, which is e.g. 2^12 by default on linux, after that all bets are > off and the kernel is free to interleave different write calls. We are only interested in the use of race-safe append in the tracing, so we should be OK in practice. but then ... > So there's still a use for a race_safe_append_open() wrapper function, > to O_APPEND and do the PIPE_MAX assertion. Otherwise you're calling a > "safe" function which isn't safe at all anymore. ... having an assert that would never trigger is not all that bad ;-)