Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 21 Oct 2014 09:59:58 -0500
From: Josiah Worcester <josiahw@...il.com>
To: musl@...ts.openwall.com
Subject: Re: Why stdout_write checks for terminal?

On Tue, Oct 21, 2014 at 9:56 AM, Sergey Dmitrouk <sdmitrouk@...esssoftek.com
> wrote:

> Hi,
>
> the code in src/stdio/__stdout_write.c checks whether output is going to
> a terminal and if it's not the case disables line buffering.  I'm
> wondering what's the reason behind this?  This causes some programs to
> produce different output depending whether stdout is terminal or not,
> not a bit deal, but I don't see much profit in disabling buffering
> either.
>
> Regards,
> Sergey
>

>From the spec <
http://pubs.opengroup.org/onlinepubs/009695399/functions/stdin.html>:  "the
standard input and standard output streams are fully buffered if and only
if the stream can be determined not to refer to an interactive device."

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.