|
From: | Paul Eggert |
Subject: | Re: `message' not outputting the newline "atomically" |
Date: | Sun, 23 Jun 2019 14:00:06 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 |
Lars Ingebrigtsen wrote:
That's true, but the special thing about that message_to_stderr function is that it first does that fwrite, and then the fputc for the newline, which is exactly what make this glitch appear. That can be rewritten rather trivially to do just one fwrite...
Yes, that particular function can be fixed, but unfortunately there are several other functions like that, and they can't all be fixed so easily. I wrote a simple three-line patch to fix them all, but if you'd rather do it the hard way and "audit the sources from now to eternity" to make sure the hard way continues to be done correctly everywhere in the future, please feel free to do that. Or if you want to fix just message_to_stderr but not the other occurrences of the problem, please feel free to do that too. Either of these things would improve over what is in master now, although they wouldn't be as good as the three-line fix.
[Prev in Thread] | Current Thread | [Next in Thread] |