Re: file sync on close(2)
Re: file sync on close(2)
- Subject: Re: file sync on close(2)
- From: Marek Kozubal <email@hidden>
- Date: Mon, 14 Jun 2004 21:16:20 -0400 (EDT)
On Mon, 14 Jun 2004, Jay A. Kreibich wrote:
To repeat a third time: UPDATE(8) WON'T BE RUNNING. I CANNOT CALL SYNC(8).
Of course you can call sync(). updated mearly calls sync every 30
seconds.
man 8 update
SYNOPSIS
update
DESCRIPTION
The update command helps protect the integrity of disk volumes by flush-
ing volatile cached filesystem data to disk at thirty second intervals.
Update uses the sync(2) function call to do the task.
and
man 2 sync
SYNOPSIS
#include <unistd.h>
void
sync(void);
DESCRIPTION
The sync() function forces a write of dirty (modified) buffers in the
block buffer cache out to disk. The kernel keeps this information in core
to reduce the number of disk I/O transfers required by the system. As
information in the cache is lost after a system crash a sync() call is
issued frequently by the user process update(8) (about every 30 seconds).
The function fsync(2) may be used to synchronize individual file descrip-
tor attributes.
It seems like sync() should even work in single-user mode according to
these man pages...
---
Marek Kozubal
email@hidden
_______________________________________________
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.