Scanning stdin with no pause

Phil Chadwick phil at qfdts.OZ
Fri Jan 11 17:24:29 AEST 1985


    >>     I am working with V7 UN*X.  I need a way to scan the standard input
    >> stream for a character, but not wait.
    >
    >This is not supported by 7th Edition UNIX.  You need to add something
    >to your kernel to do this directly; the Rand Corp. empty() call has
    >been distributed by USENIX a long time ago, and more recent approaches
    >include VTIME,VMIN in AT&T UNIX Systems III & V and select() in 4.2BSD.
 
VTIME and VMIN index the control character array in the termio structure
of USG systems.  They appear to be potentially very usefull, but I have
been unable to locate any printed documentation on how to manipulate
c_cc[VTIME] and c_cc[VMIN] to achieve a non-blocking read.  Can anyone
enlighten me please?
----
Phil Chadwick			Australia:	(07) 2296500
Department of Forestry		International:	+61 7 2296500
PO Box 5
Brisbane, Roma Street		SUN:	phil:qfdts		
AUSTRALIA	4001		UUCP:	{decvax,vax135}!mulga!phil:qfdts



More information about the Comp.unix.wizards mailing list