Re: Libc thread cancelation safety?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Dean Anderson:

> I have noticed that printf in glibc (glibc 2.3.5, i386) is not pthread
> cancellation safe, though printf on Solaris is cancellation safe.  
> Specifically, canceling a thread in printf leads to deadlock.
>
> What should one expect regarding cancelation safety in standard
> libraries?  Is this a bug in glibc?

Asynchronous cancellation is inherently unsafe.  I can't find a full
list of functions which may be called from a thread which is subject
to asynchronous cancellation right now, but it is undoubtly very short
and does not include anything which touches the heap or uses the stdio
I/O facilities.  Most bare system calls (read, write, close, pipe)
should be fine, though.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux