From: Rick Sladkey (jrs@world.std.com)
Date: 07/22/92


From: jrs@world.std.com (Rick Sladkey)
Subject: Re: Good comm program?
Date: Thu, 23 Jul 1992 00:32:46 GMT


>>>>> On 21 Jul 92 23:50:57 GMT, hlu@phys1.physics.wsu.edu (Hongjiu Lu) said:

H.J.> If you use stdio, I believe everything is buffered by default.

The defaults for Unix since K&R are:

* stdin and stdout to a terminal/pty are line-buffered

* stdin and stdout to a file or pipe are block-buffered

* stderr is alway unbuffered

* a read from a terminal/pty causes a flush of any output to the same device

Earlier versions of iostream had various discrepencies with this scheme
but iostream for GCC 2.2.2 now follows these conventions.