From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: `message' not outputting the newline "atomically" Date: Sun, 23 Jun 2019 01:34:05 -0700 Organization: UCLA Computer Science Department Message-ID: <6f34c3a3-2f0a-e581-0dfe-4e4619e0b3dc@cs.ucla.edu> References: <83y31xr3aa.fsf@gnu.org> <26154872-1a5c-7302-0f32-b16aff8e0ae7@cs.ucla.edu> <83blytq90m.fsf@gnu.org> <95de57fb-ef8c-a65f-d3ca-4a9e7f0f38bc@cs.ucla.edu> <83a7ecquzb.fsf@gnu.org> <83tvckp5ni.fsf@gnu.org> <83r27op1wb.fsf@gnu.org> <60d1b05d-ef4c-252a-0626-8c69c103fdf0@cs.ucla.edu> <83o92rpk1g.fsf@gnu.org> <9d07a8e2-7f9b-bbfa-b73e-0d7aee09b099@cs.ucla.edu> <83zhmankgu.fsf@gnu.org> <31b12a41-18f2-d20c-55dc-28f7adb8606c@cs.ucla.edu> <83y31tm40j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="231494"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 Cc: schwab@suse.de, larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 23 10:34:43 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 1hexxR-000y4O-KL for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2019 10:34:41 +0200 Original-Received: from localhost ([::1]:43638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hexxQ-0000mM-8t for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2019 04:34:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36028) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hexx2-0000m2-2w for emacs-devel@gnu.org; Sun, 23 Jun 2019 04:34:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hexx1-0002Us-1p for emacs-devel@gnu.org; Sun, 23 Jun 2019 04:34:16 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39810) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hexwz-0002R9-A6; Sun, 23 Jun 2019 04:34:13 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 22E64161D06; Sun, 23 Jun 2019 01:34:07 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZPJrG45VXlLb; Sun, 23 Jun 2019 01:34:06 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 505E3161D07; Sun, 23 Jun 2019 01:34:06 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ImAc7Hbo2-Yw; Sun, 23 Jun 2019 01:34:06 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 22E69161CF2; Sun, 23 Jun 2019 01:34:06 -0700 (PDT) In-Reply-To: <83y31tm40j.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:238054 Archived-At: Eli Zaretskii wrote: > What if Emacs crashes half way through that loop What, due to a hardware error or a buffer overrun or something like that? In that case all bets are off: Emacs could output nonsense or truncated output regardless of whether it uses one system call or a hundred. Besides, if we were allowed to hypothesize nonexistent bugs to argue against a change to Emacs, then we could easily argue against any change whatsoever. When thinking about changes to Emacs, it's more productive to consider real problems than imaginary ones. > the number of system calls is not something we should be > bothered with If by "number of system calls" you're referring to performance, then I agree that stderr output typically is not a significant performance problem (this particular output certainly isn't). However, the motivation for line-buffering stderr is correctness, not performance. Line-buffered stderr does a better job of interleaving diagnostics from parallel instances of Emacs, and this is what prompted the fix in question. The poorly-interleaved diagnostics have been a practical problem that has bugged me for a while, and bugs Lars and I assume others. In contrast, unbuffered stderr's only advantages mentioned so far have been theoretical.