home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!sgigate!odin!mips!darwin.sura.net!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!ns!news
- From: dmb@eddore.network.com (Duane M. Butler)
- Newsgroups: comp.unix.programmer
- Subject: close(hFile) -- Does it write data to disk?
- Message-ID: <1992Aug13.203508.12617@ns.network.com>
- Date: 13 Aug 92 20:35:08 GMT
- Sender: news@ns.network.com
- Organization: Network Systems Corporation
- Lines: 14
- Originator: dmb@eddore
- Nntp-Posting-Host: eddore
-
-
- I have ported an application from DOS to SunOS 4.1. The application manages
- some database files and uses a transaction tracking file to protect the
- database integrity in the event of failure (ie., power outage). For every
- database write operation an entry is added to the transaction file. For this
- to work properly, the transaction file must be flushed to disk after every
- write. I'm currently using the close() system call followed by open() to
- flush the file. Can I safely rely on close() to write data to disk, or is
- there some other mechanism?
-
- Many Thanks,
-
- Duane Butler
- dmb@network.com
-