Mail Archives: djgpp/1996/08/22/01:27:10
On Wed, 21 Aug 1996 fredex AT fcshome DOT stoneham DOT ma DOT us wrote:
> If you're using the open()/read()/write()/close() family, you should
> also be able to dup() the file handle then close the duplicate, which
> should cause that particular file to be flushed to disk. I'd expect this
> to have a lower impact on system load than a sync() or fsync(), since it
> deals with only this one file.
`fsync' only commits a single file, so it's faster than `close', because
`close' also does other things besides updating the disk. The only
problem with `fsync' is portability: it isn't usually available with other
DOS compilers (Unix does have it). However, it's very simple to write
such a function: it's only a single DOS function call (Int 21h/AX=6800h).
- Raw text -