Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!uunet!wupost!usc!sdd.hp.com!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry From: terry@cs.weber.edu (A Wizard of Earth C) Subject: Re: Problems with select() and serial ports Message-ID: <1992Aug19.014931.26539@fcom.cc.utah.edu> Sender: news@fcom.cc.utah.edu Organization: Weber State University (Ogden, UT) References: <1992Aug18.034054.4016@timesink.spk.wa.us> Date: Wed, 19 Aug 92 01:49:31 GMT Lines: 41 In article <1992Aug18.034054.4016@timesink.spk.wa.us> kew@timesink.spk.wa.us (Keith Walker) writes: > >I recently got 386bsd 0.1 going on my machine and not too long after that >installed Chris Demetriou's serial driver, which really works good in spite >of the much maligned copyright :-) > >But, the select() call doesn't seem to work right when calling the serial >ports. The behaviour is easy to replicate; just press ESC when in vi. The >escape will not be recognized until another character is received. So, it >seems the timeout isn't working right when there's only one character to be >read. > >Hmmm. > >I am not a kernel guru, nor do I play one on the net. I'm hoping someone >else out there (maybe cgd?) will have some idea of what the problem is or >maybe even have a fix. I play one on the net 8-). A patch to the original driver (not Chris', unfortunately) was posted in this news group some articles back (when I extract something to make a patch directory, I remove it, so I can't give you a ref #). You can play a kernel guru on the net too! The fix is to make the device numbers start with 0 rather than 1 so that select will get the correct index to do it's thing. Currently, a select() on an open com1 selects on the 2nd port (com2) and a select() on an open com2 selects on the third (probably non-existant) port (com3). Terry Lambert terry_lambert@gateway.novell.com terry@icarus.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers. -- ------------------------------------------------------------------------------- terry@icarus.weber.edu "I have an 8 user poetic license" - me -------------------------------------------------------------------------------