problem with disable buffering

Sunit Bhatia bhatia_sunit@hotmail.com
Fri May 18 21:02:00 GMT 2001


Hi,
I need to disable buffering while writing to a file and I've tried using 
setbuf and setvbuf, but it doesn't seem to be working.
I tried using fflush() after every file write operation, but that also 
doesn't work. I've tried using different write methods (fputc, fwrite, fputs 
etc) and have tried changing the sequence in which setbuf and setvbuf is 
called, but none seems to be showing results.

I've got two applications, one keeps on writing to the file and the other 
reads from the same file but there is a time delay between the write and 
read operations, which I need to remove. Right now this time is from 5 to 25 
seconds.

does anybody know how can I achieve this ?

thanks for the help
Sunit
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com .



More information about the Gcc-help mailing list