From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6377 Path: news.gmane.org!not-for-mail From: Sergey Dmitrouk Newsgroups: gmane.linux.lib.musl.general Subject: Why stdout_write checks for terminal? Date: Tue, 21 Oct 2014 17:56:40 +0300 Message-ID: <20141021145640.GA5781@zx-spectrum.accesssoftek.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: ger.gmane.org 1413903424 9871 80.91.229.3 (21 Oct 2014 14:57:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2014 14:57:04 +0000 (UTC) To: Original-X-From: musl-return-6390-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 21 16:56:58 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Xgarp-0002G9-Hn for gllmg-musl@plane.gmane.org; Tue, 21 Oct 2014 16:56:57 +0200 Original-Received: (qmail 19728 invoked by uid 550); 21 Oct 2014 14:56:55 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19720 invoked from network); 21 Oct 2014 14:56:55 -0000 Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:6377 Archived-At: 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