From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: `message' not outputting the newline "atomically" Date: Tue, 25 Jun 2019 19:08:41 +0300 Message-ID: <83o92llkae.fsf@gnu.org> References: <07619925-e367-fb88-2dd8-27addb2e9052@grinta.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236499"; mail-complaints-to="usenet@blaine.gmane.org" Cc: larsi@gnus.org, daniele@grinta.net, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 25 18:21:55 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfoCg-000zPr-SW for ged-emacs-devel@m.gmane.org; Tue, 25 Jun 2019 18:21:54 +0200 Original-Received: from localhost ([::1]:33700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfoCf-0004vS-92 for ged-emacs-devel@m.gmane.org; Tue, 25 Jun 2019 12:21:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42192) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfo05-0005q8-24 for emacs-devel@gnu.org; Tue, 25 Jun 2019 12:08:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hfnzx-0000OP-7J; Tue, 25 Jun 2019 12:08:47 -0400 Original-Received: from [176.228.60.248] (port=1651 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hfnzs-0006j7-OO; Tue, 25 Jun 2019 12:08:42 -0400 In-reply-to: (message from Paul Eggert on Mon, 24 Jun 2019 14:11:31 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238140 Archived-At: > From: Paul Eggert > Date: Mon, 24 Jun 2019 14:11:31 -0700 > Cc: Daniele Nicolodi , emacs-devel@gnu.org > > * The buffer should contain only PIPE_BUF bytes, since writes larger > than that can be split by the operating system anyway so any excess size > is wasted. On POSIX platforms you can use fpathconf to calculate > PIPE_BUF for stderr. I don't know how to calculate it on MS-Windows > platforms, but maybe it doesn't matter and you can just pretend it's > 1024 or whatever. I think the equivalent size on Windows should be between 16 and 64KB (AFAIK, the recent versions of Windows increased it to the latter value). But as we are talking about 'fwrite', isn't a more important value the buffer size of the FILE stream object? That one is usually something like 4KB, I think.