How are POSIX cancellation points supposed to behave?
问题 I've been looking at glibc/nptl's implementation of cancellation points, and comparing it to POSIX, and unless I'm mistaken it's completely wrong. The basic model used is: int oldtype = LIBC_ASYNC_CANCEL(); /* switch to asynchronous cancellation mode */ int result = INLINE_SYSCALL(...); LIBC_CANCEL_RESET(oldtype); According to POSIX: The side-effects of acting upon a cancellation request while suspended during a call of a function are the same as the side-effects that may be seen in a single