home *** CD-ROM | disk | FTP | other *** search
- 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
- From: lhotka@abel.incstar.com
- Newsgroups: comp.os.vms
- Subject: re: Flushing file buffers to disk in VAX C
- Message-ID: <1993Jan25.090532.2854@abel.incstar.com>
- Date: 25 Jan 93 15:05:32 GMT
- References: <9301231826.AA03802@uu3.psi.com>
- Organization: INCSTAR Corp, Stillwater MN
- Lines: 43
-
- In article <9301231826.AA03802@uu3.psi.com>, leichter@lrw.com (Jerry Leichter) writes:
- >
- > The problem:
- > ------------
- > I am running VMS 5.5-1 on a VAXstation 4000 model 60. I find that the
- > C library call fsync() does not write the file buffers to disk as it
- > is supposed to. Could someone else run the program below on this or
- > earlier versions of VMS and check it? Run the program on one
- > terminal, and when it stops to wait for input, kill the process using
- > the STOP command from another terminal. If I understand the
- > functionality of fsync() correctly, the buffers should have been
- > flushed to disk - but when you look at the file after stopping the
- > process, it is still empty. Is this a bug?
- >
- > Well, no. Since fsync() is neither documented nor supported, it can't
- > possibly have any bugs; if its effect were to delete every other file in
- > your directory, that might be rather undesireable behavior, but it wouldn't
- > really be a BUG. :-)
- >[...]
-
- One quick contribution to these discussions - I have an eval copy of the DEC C++
- compiler which comes with the 'DEC C Run-Time Library Reference Manaul for
- OpenVMS Systems' (part AA-PREYA-TE). This manual documents the fsync() function,
- though it is not done in such a way that it is clear that the fflush() call
- is required. It does explain the limitations of fflush() itself.
-
- According to DECdirect, the DEC C compiler is currently available for VAX/VMS,
- so there is apparently now an ANSI compliant compiler available to replace
- VAX C.
-
- When I installed the C++ compiler it DID put updated (new and incompatable)
- versions of the C run-time library on the system. It makes note that these
- new library files are required for DEC C and DEC C++ to provide the ANSI
- compliance.
-
- The overall point here being that the fsync function is undocumented for
- _VAX C_, but it is documented in near-future or present products.
-
- Rockford Lhotka INCSTAR Corp
- Systems Analyst 1990 Industrial Blvd
- lhotka@incstar.com PO Box 285
- 612/779-1701 Stillwater, MN 55082
- >>>Amiga - The computer for the creative mind<<<
-