From: Linus Torvalds Date: Sun, 03 Aug 2008 21:46:18 GMT Subject: Re: [PATCH] Use line buffering for standard output Message-ID: In-Reply-To: <1217798768-18021-1-git-send-email-mail@cup.kalibalik.dk> On Sun, 3 Aug 2008, Anders Melchiorsen wrote: > > Normally, stdout is fully buffered, unless it refers to a terminal > device. This gives problems when fork() is in play: the buffer is > cloned and output appears twice. > > By always setting stdout to line buffering, we make the output work > identically for all output devices. Please don't. This is a huge peformance issue for things like git log -p > file where we really want it to be fully buffered. So please just find the place where we do a fork() without flushing pending output... (We really shouldn't have all that many "fork()" calls left, I thought - the Windows stuff means that most of it should be abstracted away. So it's not like we're talking about hundreds of sites, there should be just a couple). Linus