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: Sun, 23 Jun 2019 01:34:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

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.



reply via email to

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