Need Non-Blocking Terminal Input Fu

acheng at uiucdcs.CS.UIUC.EDU acheng at uiucdcs.CS.UIUC.EDU
Tue Jan 28 04:58:00 AEST 1986


/* Written 12:27 pm  Jan 22, 1986 by cramer at kontron.UUCP in uiucdcs:net.unix-wizar */
/* ---------- "Need Non-Blocking Terminal Input Fu" ---------- */
Does anyone know of a way to do read from a terminal under Berkeley 4.2 UNIX
so that after a specified number of seconds control is returned to the
program if there is no response?  ...
/* End of text from uiucdcs:net.unix-wizar */

Try "select(2)".  It has a timeout feature.

----------------------------------------------------------------------
Albert Cheng
acheng at UIUC.ARPA	acheng at UIUC.CSNET	{ihnp4,pur-ee}!uiucdcs!acheng
Dept. of Computer Science, Univ. of Illinois-Urbana,
Rm. 240, 1304 W. Springfield, Urbana, IL 61801

%%% The above is the opinion of my own %%%
%%% and not necessarily that of the management. %%%



More information about the Comp.unix.wizards mailing list