[PATCH] Always do locking when accessing streams (bug 15142)

Florian Weimer fweimer@redhat.com
Mon Nov 25 13:30:00 GMT 2019


* Andreas Schwab:

> On Nov 21 2019, Florian Weimer wrote:
>
>>>> Does this fix or re-open bug 15142?
>>>
>>> Why re-open?
>>
>> Lack of flushing of streams on process exit.
>
> I don't understand what you are trying to tell me.

Hmm.  Bug 15142 is not the bug, but don't we have a bug somewhere about
not flushing streams on exit (as opposed to abort)?

>> I think the last time we discussed this,
>
> Do you have a pointer?

I can't find the discussion.  But I think we discussed it somewhere.
The main question is whether it is acceptable for programs to hang
indefinitely if a flushable stream is locked for some reason.  POSIX
actually seems to require that behavior, but I'm not sure how
backwards-compatible it is.  There are probably quite a few libraries
which store a FILE * internally, use flockfile to get performance, and
synchronize access to the file by other means.

Thanks,
Florian



More information about the Libc-alpha mailing list