Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site proper.UUCP
Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!intelca!proper!johnl
From: johnl@proper.UUCP (John A. Limpert )
Newsgroups: net.unix
Subject: non-blocking read
Message-ID: <964@proper.UUCP>
Date: Fri, 3-Feb-84 10:14:22 EST
Article-I.D.: proper.964
Posted: Fri Feb  3 10:14:22 1984
Date-Received: Thu, 9-Feb-84 02:06:30 EST
Organization: Proper UNIX, San Leandro, CA
Lines: 8

Is there any clean way for a program to determine whether or not the
user has typed a character on the keyboard without blocking the
program?  The only scheme I have been able to come up with is to fork
another process that reads characters from the tty and writes them
into a file.  The main process could then check the size of the file
to determine if there were any new characters to process.  I know
that the kernel I/O drivers have this information, is there any way
of getting it without spying on some magic location in /dev/kmem?