Re: file sync on close(2)
Re: file sync on close(2)
- Subject: Re: file sync on close(2)
- From: Jim Magee <email@hidden>
- Date: Fri, 11 Jun 2004 22:42:50 -0700
On Jun 8, 2004, at 9:48 AM, Justin Walker wrote:
>
On Jun 7, 2004, at 21:56, Jay A. Kreibich wrote:
>
>
> I have a fairly simple question, but I need a very sure answer.
>
>
>
> If close(2) is called on the last file descriptor that references
>
> a standard file, are dirty pages associated with that file's buffers
>
> automatically queued for writing, in a similar manor to sync(2)?
>
>
Yup.
I would modify Justin's answer slightly to say that "if the data was
written with the write(2), etc... set of programmatic interfaces, the
data will be sync'ed automatically by the update(8) daemon." But this
is not really tied to the close(2) call. If the data was written into
the memory of a mapped file, the data would only by sync'ed with an
explicit call to msync(2). Otherwise, it stays modified in memory
until the system needs to recycle the memory (even an explicit sync(8)
call will not push it out).
--Jim
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.