Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B UNSW 1.0 3/14/84; site qfdts.OZ Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!mulga!munnari!basser!uqcspe!qfdts!phil From: phil@qfdts.OZ (Phil Chadwick) Newsgroups: net.unix-wizards Subject: Re: Scanning stdin with no pause Message-ID: <22@qfdts.OZ> Date: Fri, 11-Jan-85 02:24:29 EST Article-I.D.: qfdts.22 Posted: Fri Jan 11 02:24:29 1985 Date-Received: Wed, 16-Jan-85 04:38:05 EST References: <6674@brl-tgr.ARPA> <6678@brl-tgr.ARPA> Organization: Department of Forestry, Brisbane, Australia Lines: 20 >> 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