www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/22/01:27:10

Date: Thu, 22 Aug 1996 08:20:04 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: fredex AT fcshome DOT stoneham DOT ma DOT us
Cc: djgpp AT delorie DOT com
Subject: Re: interrupting with ctrl-C
In-Reply-To: <199608211633.MAA03385@fcshome.stoneham.ma.us>
Message-Id: <Pine.SUN.3.91.960822081423.2237I-100000@is>
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019