Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!ut-sally!husc6!mit-eddie!uw-beaver!ubc-vision!fornax!bby-bc!john
From: john@bby-bc.UUCP (john)
Newsgroups: comp.lang.c,comp.unix.questions
Subject: Re: Keyboard Input (Revised Question) ...
Message-ID: <142@bby-bc.UUCP>
Date: Fri, 17-Jul-87 00:13:11 EDT
Article-I.D.: bby-bc.142
Posted: Fri Jul 17 00:13:11 1987
Date-Received: Sat, 18-Jul-87 14:45:48 EDT
References: <1043@bucsb.bu.edu.UUCP> <805@nu3b2.UUCP>
Organization: Burnaby, British Columbia, Canada
Lines: 18
Xref: mnetor comp.lang.c:3120 comp.unix.questions:3226

> SERIOUSLY: use the function ioctl to set O_NDELAY on standard input,
> use read to read your character. if there are no characters waiting, and you
> are not at an EOF condition read will return -1 and errno will be set to
> EAGAIN.
> 
> This is how it is on our machine, check read(2) in your programmers
> refrence [or wherever] for details. AND REMEMBER TO ALWAS CLEAN UP
> YOUR ioctl BEFORE BRANCHING/EXITING FROM THE LOOP OR GO UP IN FLAMES!


Isn't it supposed to return 0  if there are no characters read.  Also
isn't there an ioctl() settable value that specifies the minimum number
of characters which must be in the buffer before a request is satisfied,
along with a time period after which this many characters don't need to
be there?


john