forked from openrs2/openrs2
We fsync the temp file before doing the atomic move, which I think is necessary if the underlying filesystem re-orders the operations (e.g. if the atomic move is performed before the writes to the temp file have been flushed to disk). Similarly we fsync the parent dir before returning. For a single atomic write in isolation this probably isn't important, but probably is useful if a sequence of atomic writes is performed in order. Signed-off-by: Graham <gpe@openrs2.org>master
parent
2292b9449c
commit
f7e194dfa6
Loading…
Reference in new issue