FreeBSD/lib/libthr/thread/thr_syscalls.c
/*
 * Cancellation behavior:
 *   If thread is canceled, the system call is not completed,
 *   this means not all bytes were drained.
 */
Cancellation behavior:
If thread is canceled, the system call is not completed,
this means not all bytes were drained.
Cancellation behavior : If thread is canceled the system call is not completed this means not all bytes were drained .
static int
__thr_tcdrain(int fd)
{
	struct pthread *curthread;
	int ret;
	curthread = _get_curthread();
	_thr_cancel_enter(curthread);
	ret = __libc_tcdrain(fd);
	_thr_cancel_leave(curthread, ret == -1);
	return (ret);
}
static int __thr_tcdrain ( int fd ) { struct pthread * curthread ; int ret ; curthread = _get_curthread ( ) ; _thr_cancel_enter ( curthread ) ; ret = __libc_tcdrain ( fd ) ; _thr_cancel_leave ( curthread , ret == -1 ) ; return ( ret ) ; }
Cancellation behavior:
   If thread is canceled, the system call is not completed,
   this means not all bytes were drained.
Cancellation behavior : If thread is canceled the system call is not completed this means not all bytes were drained .