Comment

Comment by hun3

C has this problem too: see signal-safety(7).

> * 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().

parent hun3 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton