[PATCH] abort: Only flush file-based stdio streams before termination

Szabolcs Nagy szabolcs.nagy@arm.com
Mon Aug 21 13:47:00 GMT 2017


On 21/08/17 10:11, Florian Weimer wrote:
> On 08/21/2017 10:58 AM, Andreas Schwab wrote:
>> Is it?  That would simply be a programming error.  Since POSIX requires
>> locking on stdio I don't see how it can require exit to use no locking.
> 
> Is exit a function which references a FILE * object?  What about fflush
> (NULL)?
> 
> POSIX says this:
> 
> “
> All functions that reference (FILE *) objects, except those with names
> ending in _unlocked, shall behave as if they use flockfile() and
> funlockfile() internally to obtain ownership of these (FILE *) objects.
> ”
> 
> I have no idea whether this expresses an intent that only explicit FILE
> * references cause locking and, potentially blocking, or if this wording
> is the result of a quick specification hack to add thread safety to stdio.
> 

see interpretation response of
http://austingroupbugs.net/view.php?id=611



More information about the Libc-alpha mailing list