From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: `message' not outputting the newline "atomically" Date: Sun, 23 Jun 2019 22:42:29 +0200 Message-ID: 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> <9f6382a8-4bb4-1018-fe18-ab01225bb4e4@cs.ucla.edu> <8df7509f-229e-3ce0-1d35-ab361467e4f9@grinta.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="17285"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Daniele Nicolodi , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 23 22:43:20 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 1hf9KZ-0004Oj-GK for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2019 22:43:19 +0200 Original-Received: from localhost ([::1]:46706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf9KY-0008Su-GC for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2019 16:43:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52576) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf9Jt-0008PR-Lo for emacs-devel@gnu.org; Sun, 23 Jun 2019 16:42:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hf9Js-0001o2-MU for emacs-devel@gnu.org; Sun, 23 Jun 2019 16:42:37 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:55300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hf9Js-0001mv-A1 for emacs-devel@gnu.org; Sun, 23 Jun 2019 16:42:36 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf9Jl-0001n9-Lq; Sun, 23 Jun 2019 22:42:32 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVrAE/u2Q11AFpzAFjW pSP+/AD++ADlxRb+9ADdshu0X13Femr//wD87QObO01vAFC6cJlAAAAA9UlEQVQ4jWMwNlLCAMpA zKAyEwSml6OAQsFHDLZnsALSJR4z/MUlQbpRpEo8YlAclUAGMWcWMSgeWe3S7bV9h/eeswv3nDmy umTV2j2nd4Mkzmw8vdP99satZ05v3HOm+kz1Gpc9t3MgEsf3eG3f4nOmGijhWeUN1HFkNUTi7B73 M9u3HtsNNKo62nvpij2Bp+/AJXZ4b/HZuHrOkV1T9kxZ7Q2xAysYyRKGuCQ+YpdYzPAdu8R6Bnac EjFYJR4wsKeGggFMJBSo8GhoKFCio60jDQhCkUFYGEgCBtKQwQMGzrsQ0IEKHjCwzMQAU1xcXB4w 4AIA2p8ex3y0XKEAAAAASUVORK5CYII= In-Reply-To: (Paul Eggert's message of "Sun, 23 Jun 2019 13:34:37 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 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:238074 Archived-At: Paul Eggert writes: > Although the original bug report was indeed about 'message', the > problem can occur with any output sent to stderr, and merely fiddling > with 'message' will not fix the more-general problem. That's true, but the special thing about that message_to_stderr function is that it first does that fwrite, and then the fputc for the newline, which is exactly what make this glitch appear. That can be rewritten rather trivially to do just one fwrite... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no