home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!cs.utexas.edu!rutgers!spcvxb!terry
- From: terry@spcvxb.spc.edu (Terry Kennedy, Operations Mgr.)
- Newsgroups: comp.os.vms
- Subject: Re: VAX c
- Message-ID: <1992Dec26.211521.4768@spcvxb.spc.edu>
- Date: 27 Dec 92 02:15:21 GMT
- References: <24DEC199220084219@spades.aces.com> <Bzt6EF.Est@dale.cts.com>
- Organization: St. Peter's College, US
- Lines: 36
-
- In article <Bzt6EF.Est@dale.cts.com>, glippert@dale.cts.com (George Lippert) writes:
- > So how do I make sure that the buffer gets onto disk? (in my case), I asked.
- > They told me that there is an "unsupported and undocumented" function that I
- > could call. Thanks, but no thanks, I said.
-
- At the risk of adding some useful information to this discussion 8-), I
- think they were talking about the VAX C fsync() function. This is a worker
- function used in the VAXCRTL to flush RMS buffers. It does exactly what you
- want. Since it is used by the RTL, it is unlikely to change in future re-
- leases of VAX C. On the other hand, it may not be present in DEC C (the up-
- coming ANSI-compliant C compiler for VMS from DEC). DEC C may not even need
- this as fflush() may work as you hope there. Ehud, want to check this on
- your Alpha?
-
- Anyway, here is a brief extract, quoted for purposes of review, of the
- fsync() description. This can be found on the listings CD as [V552.VACXRTL
- .LIS]VAXCIO.LIS:
-
- 2694 ;++ [095]
- 2695 ; fsync - force a synchronization of file with user I/O
- 2696 ;
- 2697 ; This function simply calls SYS$FLUSH for the file indicated to
- 2698 ; make sure that the physical I/O happens NOW for any logical I/O
- 2699 ; calls that the user has made.
- 2700 ;
- 2701 ; input:
- 2702 ; 4(ap) file descriptor number
- 2703 ;
- 2704 ; output:
- 2705 ; R0 = 0 success
- 2706 ; R0 <> 0 error condition - errno updated
- 2707 ;
-
- Terry Kennedy Operations Manager, Academic Computing
- terry@spcvxa.bitnet St. Peter's College, Jersey City, NJ USA
- terry@spcvxa.spc.edu +1 201 915 9381
-