|
Message-ID: <CY4PR21MB0119987BFCD012EB4F6A31B1E0CF0@CY4PR21MB0119.namprd21.prod.outlook.com> Date: Fri, 2 Nov 2018 15:15:51 +0000 From: John Starks <John.Starks@...rosoft.com> To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>, "dirk@...iot.com" <dirk@...iot.com> Subject: RE: Deadlock when calling fflush/fclose in multiple threads > > I think we just have to move the __ofl_lock to the top of the > function, before FLOCK, and the __ofl_unlock to after the > fflush/close. Unfortunately this makes fclose much more serializing > than it was before, but I don't see any way to avoid it. > Perhaps you could keep a global count of FILEs that are still being flushed after having been removed from the list. fflush could perform a futex wait on this becoming 0.
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.