SysV terminal input queue count

Bill Mulert wdm at kfd1.UUCP
Fri Dec 16 07:30:46 AEST 1988



While doing a port of a C program from Mushdos to Unix, recently,
I needed to implement a kbhit() function. A kbhit comes in the
Mushdos library, and implementing one under a BSD Unix usually
involves an ioctl(fd, FIONREAD) or TIOQCOUNT. Ok, how does one
do it under SysV? I am looking at an NCR Tower with a system V,
and I can find no way to determine how many characters are waiting
in the terminal input queue, or even if there are, or are not
characters waiting.

                   So how can you tell?

-- 
               Bill Mulert  at  Klockner Ferromatik Desma
          {decuac,pyramid,tut.cis.ohio-state.edu}!uccba!kfd1!wdm
   wdm%kfd1 at uccba.uc.edu    Voice 606-331-8900     CIS 74766,3576



More information about the Comp.unix.questions mailing list