Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Nov 2018 15:37:18 +0000
From: John Starks <>
To: "" <>
Subject: RE: Deadlock when calling fflush/fclose in multiple threads

> I think such an approach is plausible, but involves the kind of
> complex and error-prone direct use of atomics I'm actively trying to
> eliminate. The same could be done without low level hacks via clever
> use of rwlocks or a mutex+condvar pair, but all of these involve
> namespace-safety issues and a lot more code than should be introduced
> into minimal static programs using stdio.
> For what it's worth, the only consumers of the open file list that can
> be executed more than once are fflush(NULL), fclose, and __ofl_add
> (used by fopen, etc.).
> Rich

Yeah, I can see the desire to avoid additional complexity. It would be a shame, though, for fopen or fclose of a local file to block behind flushing during an fclose of a file on a network file system, for example.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.