Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!ihuxy!ejbjr From: ejbjr@ihuxy.UUCP (Branagon) Newsgroups: net.unix-wizards Subject: Re: Checking for waiting characters Message-ID: <1364@ihuxy.UUCP> Date: Wed, 7-May-86 12:35:44 EDT Article-I.D.: ihuxy.1364 Posted: Wed May 7 12:35:44 1986 Date-Received: Tue, 13-May-86 19:31:32 EDT References: <470@brl-smoke.ARPA> <1293@ptsfa.UUCP> Organization: AT&T Bell Laboratories Lines: 17 *** REPLACE THIS MESSAGE WITH YOUR LINE *** > In article <470@brl-smoke.ARPA> KEN%NJITCCCC.BITNET@wiscvm.wisc.edu (Kenneth Ng) writes: > >On Unix System V version 2 on an AT&T 3b5, has anyone been able to > >successfully test if characters are pending? I've got an application > >that needs to time out after a certain amount of time if no characters > >come through. The easiest way I've found to do this is to set an alarm, and use a signal trapping function (see alarm(2) and signal(2)). The alarm can be set once at the beginning, or reset after each character. I'm not sure if alarm() is sysV specific or not. ----------------- Ed Branagan ihnp4!ihuxy!ejbjr