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: Lars Ingebrigtsen
Subject: Re: `message' not outputting the newline "atomically"
Date: Thu, 27 Jun 2019 12:52:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> The commit message mentions PIPE_BUF etc., something that was
> discussed, but is not in the code.

I attempted to describe the rationale in the commit message, and
PIPE_BUF had to be mentioned (because most people don't seem to know
that there's something magical about writes below that length)...

>> That's an intriguing idea.  But is there a possibility that the fwrite
>> would fail in such a way that we'd not get back control in such a way
>> that we could guarantee that we could replace the newline with a null
>> byte again?
>
> How would that happen?  If fwrite crashes, we are going down in flames
> anyway, so no one will have the opportunity to miss that null byte.
> Any other failure means fwrite returns with an error code, and we then
> put the null byte back as usual.

It's more an instinctual reaction.  :-)   When there's IO, things can go
wrong in ways difficult to imagine, so it's just...  scary.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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