In some cases the coder cannot rely on system calls being atomic, e.g. if the file is on a NFS filesystem. (c.f. NFS Overview, FAQ and HOWTO Documents). But atomic system
The write call as defined in POSIX has no atomicity guarantee at all. So you don't need to confirm anything, it's not atomic.
It doesn't even guarantee that the data will have reached the hard drive (if there is a drive at all) if it completes successfully. Successfully reading back the data doesn't give you any guarantees either.
You'll need to use the sync
family of functions to get some durability guarantees.