This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Always do locking when accessing streams (bug 15142)
- From: Andreas Schwab <schwab at suse dot de>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 21 Nov 2019 14:14:20 +0100
- Subject: Re: [PATCH] Always do locking when accessing streams (bug 15142)
- References: <mvmpnhwvx68.fsf@suse.de> <87lfs9o1q7.fsf@oldenburg2.str.redhat.com>
On Nov 21 2019, Florian Weimer wrote:
> * Andreas Schwab:
>
>> During exit, skip files that are currently locked to avoid deadlock.
>
> Which locks are taken during the deadlock?
Presumably any FILE locks, if there are other threads still running.
> Does this fix or re-open bug 15142?
Why re-open?
>> + /* 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?
Are deadlocks conforming to POSIX?
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."