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: Wed, 03 Jul 2019 10:47:14 +0300 Message-ID: <835zojd0fx.fsf@gnu.org> References: <07619925-e367-fb88-2dd8-27addb2e9052@grinta.net> <68b398b1-3790-b32f-535d-6ea2518f79b8@cs.ucla.edu> <83pnn1lkej.fsf@gnu.org> <83tvccjrpo.fsf@gnu.org> <83zhm3i285.fsf@gnu.org> <7a39d680-6234-1301-74e5-62d599f500f6@cs.ucla.edu> <838stfd0pp.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="42599"; mail-complaints-to="usenet@blaine.gmane.org" Cc: larsi@gnus.org, daniele@grinta.net, emacs-devel@gnu.org To: eggert@cs.ucla.edu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 03 09:47:49 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 1hiZzZ-000Ash-Om for ged-emacs-devel@m.gmane.org; Wed, 03 Jul 2019 09:47:49 +0200 Original-Received: from localhost ([::1]:33454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiZzY-0006qs-P1 for ged-emacs-devel@m.gmane.org; Wed, 03 Jul 2019 03:47:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37627) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiZzD-0006qQ-S0 for emacs-devel@gnu.org; Wed, 03 Jul 2019 03:47:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hiZzD-0006Rs-Nw; Wed, 03 Jul 2019 03:47:27 -0400 Original-Received: from [176.228.60.248] (port=4468 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hiZzD-0004cW-1N; Wed, 03 Jul 2019 03:47:27 -0400 In-reply-to: <838stfd0pp.fsf@gnu.org> (message from Eli Zaretskii on Wed, 03 Jul 2019 10:41:22 +0300) 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:238316 Archived-At: > Date: Wed, 03 Jul 2019 10:41:22 +0300 > From: Eli Zaretskii > Cc: larsi@gnus.org, daniele@grinta.net, emacs-devel@gnu.org > > > Cc: daniele@grinta.net, emacs-devel@gnu.org > > From: Paul Eggert > > Date: Wed, 3 Jul 2019 00:31:18 -0700 > > > > Eli Zaretskii wrote: > > > I'm okay with making 'message' write in one go to stderr, but I don't > > > want to pay the price of having stderr buffered globally. > > > > I came up with a fix that does all that. Although the fix does not alter the > > buffering of the stderr stream, it causes 'message' and similar functions to > > write in one go to avoid interleaving output. It also fixes the problem on AIX > > and Solaris where a single call to fprintf is implemented by multiple calls to > > 'write' even if the diagnostic is short, botching interleaving. It also fixes > > the INT_MAX overflow and memory-allocation issues of the current master's > > implementation of 'message'. > > Whoa! Is it really worth all that? Including exposing this to Lisp? Actually, this patch goes way too far. It makes _all_ (or maybe almost all) writes to stderr use the new line-buffered stream, which is the same as making stderr itself line-buffered. I only agreed to making 'message' write its text in one go. Let's stick to that, please.