Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!meccts!dicome!rosevax!rose3!dan From: dan@rose3.UUCP (Dan Messinger) Newsgroups: net.lang.c,net.unix Subject: Re: C I/O Question Message-ID: <189@rose3.UUCP> Date: Thu, 7-Aug-86 13:50:26 EDT Article-I.D.: rose3.189 Posted: Thu Aug 7 13:50:26 1986 Date-Received: Sat, 9-Aug-86 05:51:25 EDT References: <1222@inuxc.UUCP> <503@hadron.UUCP> <423@argus.UUCP> Reply-To: dan@rose3.UUCP (Dan Messinger) Distribution: net Organization: Rosemount Inc., Minneapolis, MN Lines: 19 Xref: watmath net.lang.c:10190 net.unix:8839 In article <423@argus.UUCP> ken@argus.UUCP (Kenneth Ng) writes: >> If you have System V, you can also set a minimum number of >> chars before input returns, and/or a timeout. > >I've had a problem using this on an AT&T 3b5 running Syst 5R2. >It seems that if you set the min character and timeout value, >the timeout does NOT occur until the process receives at least >ONE character. If you want to check to see if there is any input pending WITHOUT waiting at all, then you should set min to 0. If you are setting min to zero, then your system is busted. Also, something not mentioned in all manuals is that the timeout should not be set to 1. Use 0 for no timeout, or a value of 2 or greater. Setting a timeout of 1 is similiar to doing a sleep(1). Dan Messinger ihnp4!rosevax!rose3!dan