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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: ioannis.kappas <at> gmail.com, 46388 <at> debbugs.gnu.org
Subject: bug#46388: 27.1; emacs -batch does not output messages immediately when invoked outside of the command prompt
Date: Thu, 11 Mar 2021 16:27:42 +0200
> Cc: 46388 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Sun, 7 Mar 2021 20:05:06 -0800
> 
> Wouldn't the attached be a simpler fix?
> 
> >From ff81c979a9528af8065169f83a78de599e99177b Mon Sep 17 00:00:00 2001
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Sun, 7 Mar 2021 20:01:37 -0800
> Subject: [PATCH] On MS-Windows, fflush stderr after newline
> 
> Problem reported by Ioannis Kappas (Bug#46388).
> * src/sysdep.c (errputc) [WINDOWSNT]: Flush stderr after newline.
> ---
>  src/sysdep.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/sysdep.c b/src/sysdep.c
> index 941b4e2fa2..88dd3e71e4 100644
> --- a/src/sysdep.c
> +++ b/src/sysdep.c
> @@ -2662,6 +2662,13 @@ errstream (void)
>  errputc (int c)
>  {
>    fputc_unlocked (c, errstream ());
> +
> +#ifdef WINDOWSNT
> +  /* Flush stderr after outputting a newline since stderr is fully
> +     buffered when redirected to a pipe, contrary to POSIX.  */
> +  if (c == '\n')
> +    fflush_unlocked (stderr);
> +#endif
>  }
>  

This is fine, please install.

Thanks (and sorry for a late response).




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.