[net.unix-wizards] Help with nobuffered I/O in 4.1

hope@gatech.UUCP (06/23/84)

How can I do unbuffered I/O on a file descriptor (opened with OPEN(2))????
I could use FOPEN and use setbuf, right?  However, I don't want to use the
stream.  I believe I can do with ioctl, but I haven't found anything appropriate
in tty(4).

Help!!!

		Ted
-- 
Theodore Hope
School of Information & Computer Science, Georgia Tech, Atlanta GA 30332
CSNet:	Hope @ GATech		 ARPA:	Hope.GATech @ CSNet-Relay
uucp:	...!{akgua,allegra,rlgvax,sb1,unmvax,ulysses,ut-sally}!gatech!hope

gwyn@BRL-TGR.ARPA (06/26/84)

From:      Doug Gwyn <gwyn@BRL-TGR.ARPA>

The correct use of a file descriptor obtained from open(2) is to
use it as a parameter in read(2) and write(2) calls, finally close(2).
read(2) and write(2) are as unbuffered as you are going to get without
using a non-filesystem "raw disk" device (the only buffering is inside
the kernel and cannot be bypassed).

Really, this question belonged on info-unix rather than unix-wizards.