home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!ucbvax!BARRA.COM!louis
- From: louis@BARRA.COM (Louis Dunne)
- Newsgroups: comp.os.vms
- Subject: Re: VAX c
- Message-ID: <9212281725.AA02681@hermann.barra.COM>
- Date: 28 Dec 92 17:25:18 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: BARRA Inc., Berkeley, California.
- Lines: 35
-
- On Dec 25, 3:08am, Ehud Gavron 602-570-2000 x. 2546 wrote:
- > Subject: Re: VAX c
- >In article <1992Dec24.173709.16437@mailer.cc.fsu.edu>, cliff@evax9.eng.fsu.edu writes...
- >#
- >#Is there a way to get VAX C to flush the VMS file buffers?
- >#
- >#I've got a program that reads data in for the tta2: port and then writes it to
- >#a file. The problem is that the data doesn't get written to the file until the
- >#buffer is full, and that may not happen but once every day or two.
- >
- > fflush(stream)
- >
- > example:
- > fflush(stdout);
- >
-
- You may also want to force RMS to flush its buffers. Use
- fsync(file-number)
- to do this. You can use the fileno() macro to get the
- file-number from a FILE structure.
-
- The last time I checked, fsync() was still undocumented,
- but it's been around for years, and hasn't changed, so
- it's probably safe enough to use.
-
- Louis
- -------------------------------------------------------------------------
- / Louis Dunne / /
- / VMS/UNIX Systems / Internet: louis@barra.com /
- / / Phone: +1 510 649-4229 /
- / BARRA, Inc. / Fax: +1 510 548-4374 /
- / 1995 University Ave., Suite 400 / /
- / Berkeley, CA 94704 / /
- -------------------------------------------------------------------------
-
-