lib/libvarnish/vtcp.c
void
VTCP_blocking(int sock)
{
	int i, j;

	i = 0;
	j = ioctl(sock, FIONBIO, &i);
	VTCP_Assert(j);
}
/*--------------------------------------------------------------------
 * Functions for controlling NONBLOCK mode.
 *
 * We use FIONBIO because it is cheaper than fcntl(2), which requires
 * us to do two syscalls, one to get and one to set, the latter of
 * which mucks about a bit before it ends up calling ioctl(FIONBIO),
 * at least on FreeBSD.
 * On Solaris ioctl(FIONBIO) can fail with connection related errnos,
 * but as long as that is how they fail, we're fine.
 */
Functions for controlling NONBLOCK mode.
We use FIONBIO because it is cheaper than fcntl(2), which requires
us to do two syscalls, one to get and one to set, the latter of
which mucks about a bit before it ends up calling ioctl(FIONBIO),
at least on FreeBSD.
On Solaris ioctl(FIONBIO) can fail with connection related errnos,
but as long as that is how they fail, we're fine.
Functions for controlling NONBLOCK mode . We use FIONBIO because it is cheaper than fcntl ( 2 ) which requires us to do two syscalls one to get and one to set the latter of which mucks about a bit before it ends up calling ioctl ( FIONBIO ) at least on FreeBSD . On Solaris ioctl ( FIONBIO ) can fail with connection related errnos but as long as that is how they fail we ' re fine .
void
VTCP_blocking(int sock)
{
	int i, j;
	i = 0;
	j = ioctl(sock, FIONBIO, &i);
	VTCP_Assert(j);
}
void VTCP_blocking ( int sock ) { int i , j ; i = 0 ; j = ioctl ( sock , FIONBIO , & i ) ; VTCP_Assert ( j ) ; }
Functions for controlling NONBLOCK mode.
Functions for controlling NONBLOCK mode .