emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `message' not outputting the newline "atomically"


From: Paul Eggert
Subject: Re: `message' not outputting the newline "atomically"
Date: Wed, 26 Jun 2019 11:58:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

Eli Zaretskii wrote:
the loop solution was proposed for those
few places where we want short messages to go out atomically, but
without making stderr line-buffered.

What am I missing?

Emacs contains many fprintf calls like this:

  fprintf (stderr, "Using %s\n", term);

Here, TERM is typically a short string. On AIX and Solaris, this fprintf is implemented via three 'write' syscalls - one for "Using ", one for the contents of TERM, and one for "\n". These outputs will be broken up and hard-to-read on AIX and Solaris, if Emacs runs in parallel with other programs also generating stderr output. Using line-buffering fixes this.

Essentially, line-buffering is designed to make short output lines atomic, which is the problem we are trying to address.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]