Difference between fflush and fsync
fflush() works on FILE*, it just flushes the internal buffers in the FILE* of your application out to the OS. fsync works on a lower level, it tells the OS to flush its buffers to the physical media. OSs heavily cache data you write to a file. If the OS enforced every write to hit … Read more