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

Florian Weimer fweimer@redhat.com
Thu Nov 21 12:25:00 GMT 2019


* Andreas Schwab:

> During exit, skip files that are currently locked to avoid deadlock.

Which locks are taken during the deadlock?

Does this fix or re-open bug 15142?

> +  /* We want to skip locked streams.  Some threads might use streams but
> +     that is their problem, we don't flush those.  */
> +  int result = _IO_flush_all_lockp (true);

Is this still conforming to POSIX?

Sorry, it's not clear to me how this patch improves matters, and if the
direction is ultimately the right one.

Thanks,
Florian



More information about the Libc-alpha mailing list