Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jul 2020 01:49:22 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   fsync(2)
Message-ID:  <0cdc3315-0213-8522-c8d6-695c2ee02923@grosbein.net>

next in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0cdc3315-0213-8522-c8d6-695c2ee02923>