This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't close or flush stdio streams on abort


On Thu, May 09, 2013 at 09:51:04AM +0200, OndÅej BÃlka wrote:
> On Wed, May 08, 2013 at 06:22:50PM -0400, Rich Felker wrote:
> > On Wed, May 08, 2013 at 11:51:26PM +0200, OndÅej BÃlka wrote:
> > > > With the right types of locks, a trylock operation could be performed
> > > > instead of waiting for a lock. This requires an async-signal-safe,
> > > > reentrant, recursive mutex.
> > > 
> > > It is most elegant solution but not only way. My comment 
> > > was that when you stop other threads and block signals then writing if 
> > > they are unlocked can be done with any type of lock. You also do not 
> > > worry to unlock correctly as program ends. (Overkill but possible.)
> > 
> > You mean you want to stop all other threads, then forcibly steal their
> > locks? This is not valid. The state protected by the lock need not be
> 
> No. I want to stop threads to stop them trying to take locks. When lock
> is held do nothing.

The easiest way to do this is by taking the lock...

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]