> * If a signal handler interrupts the execution of an unsafe function, and the handler terminates via a call to longjmp(3) or siglongjmp(3) and the program subsequently calls an unsafe function, then the behavior of the program is undefined.
Also note that pthread_cancel() provides a way to block asynchronous cancellations via pthread_setcancelstate().
> * If a signal handler interrupts the execution of an unsafe function, and the handler terminates via a call to longjmp(3) or siglongjmp(3) and the program subsequently calls an unsafe function, then the behavior of the program is undefined.
Also note that pthread_cancel() provides a way to block asynchronous cancellations via pthread_setcancelstate().