-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii


In a message dated: 30 Apr 2002 11:38:28 EDT
Jeff Macdonald said:

><snip> 
>> Someone mentioned to me that setvbuf() is "meant to be used on 
>> streams, which is character based data, and in Linux, all devices are 
>> block based" so I can't use setvbuf.
>
>Um, the way I read it from the man page, is that setvbuf is for streams,
>which is independent of the underlying disk system. Stream in this case
>means a FILE *, where data is buffered in a structure before write() is
>called to write the data. The OS may further buffer that data before
>writing it to disk in order to take advantage of other processes that
>are writing data in the same area of the disk. It is my understanding
>that fsync/fdatasync tells the OS to do it NOW. These functions have
>nothing to do with streams.

So, what you're saying is that setvbuf and f*sync have nothing to do 
with each other?  That setvbuf only controls buffering between the 
app and the stream/file it's writing to, whereas f*sync is essentially
an OS buffer control mechanism?

Thanks!

- -- 

Seeya,
Paul


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Exmh version 2.2 06/23/2000 (debian 2.2-1)

iD8DBQE8zr+2uweSOVPxKO4RAoqmAJ4qJFCobxhobFan0exhZzqzyXwpAQCfaklI
HgPtAyAYFmwWX0I4sa2pgg0=
=jNEy
-----END PGP SIGNATURE-----


*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to