FreeBSD/lib/libthr/thread/thr_syscalls.c
/*
 * Cancellation behavior:
 *   Thread may be canceled at start, but if the thread wrote some data,
 *   it is not canceled.
 */
Cancellation behavior:
Thread may be canceled at start, but if the thread wrote some data,
it is not canceled.
Cancellation behavior : Thread may be canceled at start but if the thread wrote some data it is not canceled .
static ssize_t
__thr_write(int fd, const void *buf, size_t nbytes)
{
	struct pthread *curthread;
	ssize_t	ret;
	curthread = _get_curthread();
	_thr_cancel_enter(curthread);
	ret = __sys_write(fd, buf, nbytes);
	_thr_cancel_leave(curthread, (ret <= 0));
	return (ret);
}
static ssize_t __thr_write ( int fd , const void * buf , size_t nbytes ) { struct pthread * curthread ; ssize_t ret ; curthread = _get_curthread ( ) ; _thr_cancel_enter ( curthread ) ; ret = __sys_write ( fd , buf , nbytes ) ; _thr_cancel_leave ( curthread , ( ret <= 0 ) ) ; return ( ret ) ; }
Cancellation behavior:
   Thread may be canceled at start, but if the thread wrote some data,
   it is not canceled.
Cancellation behavior : Thread may be canceled at start but if the thread wrote some data it is not canceled .