www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/21/03:18:19

Date: Wed, 21 Aug 1996 09:55:21 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Bruce Foley <brucef AT central DOT co DOT nz>
Cc: djgpp AT delorie DOT com
Subject: Re: interrupting with ctrl-C
In-Reply-To: <4v90df$qst@status.gen.nz>
Message-Id: <Pine.SUN.3.91.960821095259.336B-100000@is>
Mime-Version: 1.0

On Mon, 19 Aug 1996, Bruce Foley wrote:

> As well as the suggestion by Eli, also consider closing
> your file after each record has been written and then re-opening it.
> This is because writing to the file is not enough to ensure that it
> has actually been committed to disk.  Closing the file will ensure
> this happens.

You don't need to close a file to make sure all the data is delivered to 
disk.  Just call `fsync' library function, and it will do the same much 
quicker (`close' and `open' are very expensive).  Calling `sync' will do 
the same for all open files.

- Raw text -


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