GNU bug report logs - #46388
27.1; emacs -batch does not output messages immediately when invoked outside of the command prompt

Previous Next

Package: emacs;

Reported by: Ioannis Kappas <ioannis.kappas <at> gmail.com>

Date: Mon, 8 Feb 2021 21:22:02 UTC

Severity: normal

Found in version 27.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 46388 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 46388 <at> debbugs.gnu.org, Ioannis Kappas <ioannis.kappas <at> gmail.com>
Subject: Re: bug#46388: 27.1; emacs -batch does not output messages
 immediately when invoked outside of the command prompt
Date: Thu, 11 Feb 2021 13:15:42 -0800
On 2/11/21 6:09 AM, Eli Zaretskii wrote:
> Then maybe this:
> 
>> /* Return the error output stream.  */
>> static FILE *
>> errstream (void)
>> {
>>    FILE *err = buferr;
>>    if (!err)
>>      return stderr;
>>    fflush_unlocked (stderr);  <<<<<<<<<<<<<<<<
>>    return err;
>> }
> should be fixed to fflush 'buferr' instead (or in addition to stderr)?
> 
> Paul, isn't that a bug that we fflush stderr here, and not 'buferr'?

No, it's intended. The goal of 'errstream' is to flush out all the stuff 
written to stderr, before outputting anything sent to buferr. There is 
no need to fflush buferr here, since it's gonna be flushed soon anyway 
when a newline is output.

Functions like message_to_stderr etc. are supposed to do a series of 
calls to one or more functions like errwrite that end with outputting a 
newline, without invoking any code that outputs directly to stderr. This 
is explained in the comment before sysdep.c's errputc function, a 
comment that could perhaps be improved.




This bug report was last modified 4 years and 70 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.