Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!reed!intelhf!ichips!inews!pima!bhoughto From: bhoughto@pima.intel.com (Blair P. Houghton) Newsgroups: comp.unix.programmer Subject: Re: get character without waiting Message-ID: <4669@inews.intel.com> Date: 12 Jun 91 02:21:34 GMT References: <1991Jun12.001056.24021@watdragon.waterloo.edu> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 16 In article <1991Jun12.001056.24021@watdragon.waterloo.edu> nkkwan@crocus.uwaterloo.ca writes: > >How can I check whether there is character waiting in standard input or not? >What I want to do is something like.. > >If there is a character, then I read it. But if not, I can do something else. Y'know, I've often wondered what it was that possessed the forgers of unix to name that damn function "select(2)" instead of "checkiobuffersforremainingcharacters(2)". --Blair "This particular question has passed beyond the realm of the frequently-asked and into the paradigm of the self-asking."