Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site uiucdcs Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!acheng From: acheng@uiucdcs.CS.UIUC.EDU Newsgroups: net.unix-wizards Subject: Re: Need Non-Blocking Terminal Input Fu Message-ID: <13700119@uiucdcs> Date: Mon, 27-Jan-86 13:58:00 EST Article-I.D.: uiucdcs.13700119 Posted: Mon Jan 27 13:58:00 1986 Date-Received: Thu, 30-Jan-86 00:37:13 EST References: <482@kontron.UUCP> Lines: 18 Nf-ID: #R:kontron.UUCP:482:uiucdcs:13700119:000:775 Nf-From: uiucdcs.CS.UIUC.EDU!acheng Jan 27 12:58:00 1986 /* Written 12:27 pm Jan 22, 1986 by cramer@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@UIUC.ARPA acheng@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. %%%