non-blocking read

stroyan at hpfcra.UUCP stroyan at hpfcra.UUCP
Mon Feb 13 06:57:00 AEST 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



More information about the Comp.unix mailing list