Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Kleuskes & Moos <kleuske@somewhere.else.net> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: fflush |
| Date | 2011-09-02 17:04 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <j3r2ba$9d0$1@dont-email.me> (permalink) |
| References | <4e5fe3b1$0$27973$bbae4d71@news.suddenlink.net> <j3opkm$649$1@reader1.panix.com> <j3ovle$v37$1@dont-email.me> <Bq-dneXrT846bf3TnZ2dnUVZ_v2dnZ2d@bestweb.net> |
On Fri, 02 Sep 2011 11:05:02 -0400, Kenneth Brody wrote:
> On 9/1/2011 6:06 PM, Kleuskes & Moos wrote:
>> On Thu, 01 Sep 2011 20:23:50 +0000, John Gordon wrote:
> [...]
>>> Fflush is typically used when you want to ensure that some output gets
>>> written to the file RIGHT NOW but aren't ready to close the file yet.
>>
>> There is a line of thought that says that under those circumstances you
>> might want to consider using unbuffered I/O instead.
>
> That line of thought being flawed (IMO) due to the possibly-excessive
> I/O overhead of unbuffered I/O.
In some cases it might and buffering may provide a good solution.
> Consider, for example, a simple
> fprintf(), which, in implementations I have seen, would cause the
> generated output to be written one byte at a time.
That, and other, considerations would prompt one not to choose unbuffered
I/O, but at least you have a reason _why_ you chose to buffer and flush
instead. Much depends on the actual requirements and design parameters.
-------------------------------------------------------------------------------
_________________________________________
/ I'm a nuclear submarine under the polar \
\ ice cap and I need a Kleenex! /
-----------------------------------------
\
\
___
{~._.~}
( Y )
()~*~()
(_)-(_)
-------------------------------------------------------------------------------
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
fflush "Bill Cunningham" <nospam@nspam.invalid> - 2011-09-01 15:57 -0400
Re: fflush Willem <willem@toad.stack.nl> - 2011-09-01 20:09 +0000
Re: fflush John Gordon <gordon@panix.com> - 2011-09-01 20:23 +0000
Re: fflush sandeep <nospam@nospam.com> - 2011-09-01 20:49 +0000
Re: fflush Kenneth Brody <kenbrody@spamcop.net> - 2011-09-02 10:59 -0400
Re: fflush Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-01 22:06 +0000
Re: fflush Kenneth Brody <kenbrody@spamcop.net> - 2011-09-02 11:05 -0400
Re: fflush Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-02 17:04 +0000
Re: fflush Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-09-01 14:55 -0600
Re: fflush pete <pfiland@mindspring.com> - 2011-09-01 19:14 -0400
Re: fflush Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-09-01 17:27 -0600
Re: fflush pete <pfiland@mindspring.com> - 2011-09-01 19:33 -0400
Re: fflush Seebs <usenet-nospam@seebs.net> - 2011-09-02 01:36 +0000
Re: fflush Kenneth Brody <kenbrody@spamcop.net> - 2011-09-02 11:08 -0400
Re: fflush Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-09-02 09:35 -0600
Re: fflush Nobody <nobody@nowhere.com> - 2011-09-03 07:24 +0100
Re: fflush gordonb.47ba6@burditt.org (Gordon Burditt) - 2011-09-02 21:42 -0500
Re: fflush Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-09-02 21:01 -0600
Re: fflush Nobody <nobody@nowhere.com> - 2011-09-02 00:34 +0100
Re: fflush mathog <dmathog@gmail.com> - 2011-09-02 09:57 -0700
Re: fflush David Thompson <dave.thompson2@verizon.net> - 2011-09-09 01:28 -0400
Re: fflush gordonb.o3gsp@burditt.org (Gordon Burditt) - 2011-09-02 21:36 -0500
Re: fflush Keith Thompson <kst-u@mib.org> - 2011-09-03 12:05 -0700
Re: fflush Kenneth Brody <kenbrody@spamcop.net> - 2011-09-06 12:51 -0400
Re: fflush Keith Thompson <kst-u@mib.org> - 2011-09-06 10:51 -0700
Re: fflush "io_x" <a@b.c.invalid> - 2011-09-03 10:13 +0200
Re: fflush "io_x" <a@b.c.invalid> - 2011-09-09 08:19 +0200
csiph-web