fsync(2)

Eugene Grosbein eugen at grosbein.net
Sun Jul 12 18:49:58 UTC 2020


Hi!

Assume we have parent process that created a file and keeps it open not writing anything there.
The parent spawns a child passing file name and the child opens it,
fills it with data and exits without fsync()'ing the file.

In case of UFS there is upto 30 seconds time gap when file size is not updated,
so if crash occurs, the file ends up empty.

The question: will fsync() in parent work for such still open file descriptor?


More information about the freebsd-hackers mailing list