Re: O_CLOFORK use case

2019-06-03 Thread Mihai Donțu
On Mon, 2019-06-03 at 08:24 -0700, Joshua Hudson wrote: > I ran headlong into the use case for O_CLOFORK and got into a locking > debate over it. > > The actual use case involves squashing a thread race between two > threads. If a file is opened for write in one thread with O_CLOEXEC > while anoth

O_CLOFORK use case

2019-06-03 Thread Joshua Hudson
I ran headlong into the use case for O_CLOFORK and got into a locking debate over it. The actual use case involves squashing a thread race between two threads. If a file is opened for write in one thread with O_CLOEXEC while another thread calls fork(), a race condition can happen where the thread