home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 22012 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  2.6 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!crash!orbit!abel.incstar.com!lhotka
  2. From: lhotka@abel.incstar.com
  3. Newsgroups: comp.os.vms
  4. Subject: re: Flushing file buffers to disk in VAX C
  5. Message-ID: <1993Jan25.090532.2854@abel.incstar.com>
  6. Date: 25 Jan 93 15:05:32 GMT
  7. References: <9301231826.AA03802@uu3.psi.com>
  8. Organization: INCSTAR Corp, Stillwater MN
  9. Lines: 43
  10.  
  11. In article <9301231826.AA03802@uu3.psi.com>, leichter@lrw.com (Jerry Leichter) writes:
  12. >     The problem:
  13. >     ------------
  14. >     I am running VMS 5.5-1 on a VAXstation 4000 model 60. I find that the
  15. >     C library call fsync() does not write the file buffers to disk as it
  16. >     is supposed to. Could someone else run the program below on  this or
  17. >     earlier versions of VMS and check it? Run the program on  one
  18. >     terminal, and when it stops to wait for input, kill the process using
  19. >     the STOP command from another terminal. If I understand the
  20. >     functionality of fsync() correctly, the buffers should have been
  21. >     flushed to disk - but when you look at the file after stopping the
  22. >     process, it is still empty. Is this a bug? 
  23. > Well, no.  Since fsync() is neither documented nor supported, it can't
  24. > possibly have any bugs; if its effect were to delete every other file in
  25. > your directory, that might be rather undesireable behavior, but it wouldn't
  26. > really be a BUG.  :-)
  27. >[...] 
  28.  
  29. One quick contribution to these discussions - I have an eval copy of the DEC C++
  30. compiler which comes with the 'DEC C Run-Time Library Reference Manaul for
  31. OpenVMS Systems' (part AA-PREYA-TE).  This manual documents the fsync() function,
  32. though it is not done in such a way that it is clear that the fflush() call
  33. is required.  It does explain the limitations of fflush() itself.
  34.  
  35. According to DECdirect, the DEC C compiler is currently available for VAX/VMS,
  36. so there is apparently now an ANSI compliant compiler available to replace
  37. VAX C.
  38.  
  39. When I installed the C++ compiler it DID put updated (new and incompatable)
  40. versions of the C run-time library on the system.  It makes note that these
  41. new library files are required for DEC C and DEC C++ to provide the ANSI
  42. compliance.
  43.  
  44. The overall point here being that the fsync function is undocumented for
  45. _VAX C_, but it is documented in near-future or present products.
  46.  
  47.  Rockford Lhotka                                INCSTAR Corp
  48.  Systems Analyst                                1990 Industrial Blvd
  49.  lhotka@incstar.com                             PO Box 285
  50.  612/779-1701                                   Stillwater, MN 55082
  51.            >>>Amiga - The computer for the creative mind<<<
  52.