home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4283 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.1 KB

  1. 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
  2. From: dmb@eddore.network.com (Duane M. Butler)
  3. Newsgroups: comp.unix.programmer
  4. Subject: close(hFile) -- Does it write data to disk?
  5. Message-ID: <1992Aug13.203508.12617@ns.network.com>
  6. Date: 13 Aug 92 20:35:08 GMT
  7. Sender: news@ns.network.com
  8. Organization: Network Systems Corporation
  9. Lines: 14
  10. Originator: dmb@eddore
  11. Nntp-Posting-Host: eddore
  12.  
  13.  
  14. I have ported an application from DOS to SunOS 4.1.  The application manages
  15. some database files and uses a transaction tracking file to protect the
  16. database integrity in the event of failure (ie., power outage).  For every
  17. database write operation an entry is added to the transaction file.  For this
  18. to work properly, the transaction file must be flushed to disk after every
  19. write.  I'm currently using the close() system call followed by open() to
  20. flush the file.  Can I safely rely on close() to write data to disk, or is
  21. there some other mechanism?
  22.  
  23. Many Thanks,
  24.  
  25. Duane Butler
  26. dmb@network.com
  27.