home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19979 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.8 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!ucbvax!BARRA.COM!louis
  2. From: louis@BARRA.COM (Louis Dunne)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: VAX c
  5. Message-ID: <9212281725.AA02681@hermann.barra.COM>
  6. Date: 28 Dec 92 17:25:18 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: BARRA Inc., Berkeley, California.
  10. Lines: 35
  11.  
  12. On Dec 25,  3:08am, Ehud Gavron 602-570-2000 x. 2546 wrote:
  13. > Subject: Re: VAX c
  14. >In article <1992Dec24.173709.16437@mailer.cc.fsu.edu>, cliff@evax9.eng.fsu.edu writes...
  15. ># 
  16. >#Is there a way to get VAX C to flush the VMS file buffers? 
  17. ># 
  18. >#I've got a program that reads data in for the tta2: port and then writes it to 
  19. >#a file. The problem is that the data doesn't get written to the file until the 
  20. >#buffer is full, and that may not happen but once every day or two.  
  21. >
  22. >    fflush(stream)
  23. >
  24. >    example:
  25. >    fflush(stdout);
  26. >
  27.  
  28.     You may also want to force RMS to flush its buffers. Use
  29.         fsync(file-number)
  30.     to do this. You can use the fileno() macro to get the
  31.     file-number from a FILE structure.
  32.  
  33.     The last time I checked, fsync() was still undocumented,
  34.     but it's been around for years, and hasn't changed, so
  35.     it's probably safe enough to use.
  36.  
  37. Louis
  38.        -------------------------------------------------------------------------
  39.       / Louis Dunne                          /                                /
  40.      /  VMS/UNIX Systems                    /  Internet:   louis@barra.com   /
  41.     /                                      /   Phone:      +1 510 649-4229  / 
  42.    /    BARRA, Inc.                       /    Fax:        +1 510 548-4374 /
  43.   /     1995 University Ave., Suite 400  /                                /
  44.  /      Berkeley, CA 94704              /                                /
  45. -------------------------------------------------------------------------
  46.  
  47.