Can a call to write(2) be interrupted by OS with an fsync(2) -


i have loop of write(2) arbitrary amount of data + eol , fsync(2) appending file line line.

can crash of process leave me file has half of data write(2) call written file? theory if os calls fsync occasionally, there might coincidence of happening during call write(2) leaving file half of line written, without ending new line.

yes. without crash, might have partial line written write call might not write data passed -- might return short write.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -