Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!cottrell@nbs-vms.ARPA From: cottrell@nbs-vms.ARPA Newsgroups: net.lang.c Subject: non-blocking input Message-ID: <8628@brl-tgr.ARPA> Date: Mon, 25-Feb-85 15:57:46 EST Article-I.D.: brl-tgr.8628 Posted: Mon Feb 25 15:57:46 1985 Date-Received: Wed, 27-Feb-85 21:16:08 EST Sender: news@brl-tgr.ARPA Lines: 27 /* > I am working an a very simple game using graphics text with a > GiGi terminal. I am having a big problem with the input. When > I get to a read, or any input statment, in C, everything stops > and waits for the input. > > I want to be able to have the program check for keyboard input, and > if it is there to act upon it, otherwise to continue processing. > Is there an easy way to do this in C. I am doing this on a VAX > runnung 4.2 if that makes a difference. > > I have played around with the low leval input described in a V7 > manual, but couldn't get any where. My next thought is to fork > off a process for the background and one for the user's charactor > and then use a semaphore to allow access to the graphics cursor. > Is this nessassary, and if it is, any hints on what to watch out > for? > > Thanks to all. > > scott hossler > rochester!ritcv!sah9577 Try `select', or `open' with O_NDELAY. Both are described in sexion 2. jim */