Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles - hp internal release 1.2; site hpfcra.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!hp-pcd!hpfcla!hpfcra!stroyan From: stroyan@hpfcra.UUCP Newsgroups: net.unix Subject: Re: non-blocking read Message-ID: <54400001@hpfcra.UUCP> Date: Sun, 12-Feb-84 15:57:00 EST Article-I.D.: hpfcra.54400001 Posted: Sun Feb 12 15:57:00 1984 Date-Received: Sat, 11-Feb-84 06:37:31 EST References: <964@proper.UUCP> Organization: Hewlett-Packard - Fort Collins, CO Lines: 10 Nf-ID: #R:proper:-96400:hpfcra:54400001:000:457 Nf-From: hpfcra!stroyan Feb 6 12:57:00 1984 You can do non-blocking reads by using fcntl (in reference manual sections 2 and 7) do set the O_NDELAY status flag. Or you can open a file with O_NDELAY set if you aren't using stdin. I should warn you that if your program dies or absent-mindedly quits with O_NDELAY set for stdin, then the shell will mistake the return without delay for an EOF and log you off immediately. Mike Stroyan Hewlett Packard, Fort Collins Systems Division hpfcla!stroyan