Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 1996 19:14:37 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        questions@freebsd.org
Subject:   non-blocking read ?
Message-ID:  <199603111814.TAA18793@labinfo.iet.unipi.it>

next in thread | raw e-mail | index | archive | help
Hi,
is there a simple way to issue a non-blocking read to a regular file ?

Ideally, I would like a

	nbread(handle, buf, count);

which would start reading from the disk, and could then notify
the completion of I/O via select().

I don't know if fcntl() is enough: you can specify O_NONBLOCK for the
file, but then I have no idea if select() on that descriptor
would return immediately or will wait for at least one/the desired
amound of bytes to be available.

	Thanks
	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603111814.TAA18793>